Skip to content

Commit 444e9ee

Browse files
committed
Merge remote-tracking branch 'origin/develop'
2 parents 8b860f9 + 4c858f4 commit 444e9ee

File tree

4 files changed

+10
-1
lines changed

4 files changed

+10
-1
lines changed

runtime/util/finish_rewriting.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ bool binary_output = false;
1616
bool proof_output = false;
1717
size_t proof_chunk_size = 0;
1818

19-
extern int64_t steps;
19+
uint64_t get_steps();
2020
extern bool safe_partial;
2121
extern bool proof_hint_instrumentation_slow;
2222

@@ -54,6 +54,7 @@ void init_outputs(char const *output_filename) {
5454
}
5555

5656
if (statistics) {
57+
uint64_t steps = get_steps();
5758
print_statistics(output_file, steps);
5859
}
5960

test/defn/imp.kore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// RUN: %interpreter
22
// RUN: %check-grep
3+
// RUN: %check-statistics
34
// RUN: %proof-interpreter
45
// RUN: %check-proof-out
56
[topCellInitializer{}(LblinitGeneratedTopCell{}()), org'Stop'kframework'Stop'attributes'Stop'Source{}("Source(/home/robertorosmaninho/rv/k/llvm-backend/src/main/native/llvm-backend/test/defn/k-files/imp.md)")]

test/lit.cfg.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ def exclude_macos(s):
134134
%kore-convert %t.out.bin -o %t.out.kore
135135
%kore-convert %test-diff-out --to=text | diff - %t.out.kore
136136
''')),
137+
('%check-statistics', one_line('''
138+
%run-statistics | diff - %test-diff-statistics-out
139+
''')),
137140

138141
('%check-dir-grep', one_line('''
139142
for out in %test-dir-out/*.out.grep; do
@@ -266,6 +269,7 @@ def exclude_macos(s):
266269
('%run-binary-out', 'rm -f %t.out.bin && %t.interpreter %test-input -1 %t.out.bin --binary-output'),
267270
('%run-binary', 'rm -f %t.bin && %convert-input && %t.interpreter %t.bin -1 /dev/stdout'),
268271
('%run-proof-out', 'rm -f %t.out.bin && %t.interpreter %test-input -1 %t.out.bin --proof-output'),
272+
('%run-statistics', '%t.interpreter %test-input -1 /dev/stdout --statistics'),
269273
('%run-proof-chunks-out', 'rm -f %t.out.bin.* && %t.interpreter %test-input -1 %t.out.bin --proof-output --proof-chunk-size 100'),
270274
('%run', '%t.interpreter %test-input -1 /dev/stdout'),
271275

@@ -278,6 +282,7 @@ def exclude_macos(s):
278282
('%test-input', os.path.join('%input-dir', '%test-basename.in')),
279283
('%test-grep-out', os.path.join('%output-dir', '%test-basename.out.grep')),
280284
('%test-diff-out', os.path.join('%output-dir', '%test-basename.out.diff')),
285+
('%test-diff-statistics-out', os.path.join('%output-dir', '%test-basename.statistics.out.diff')),
281286
('%test-dir-out', os.path.join('%output-dir', '%test-basename')),
282287
('%test-dir-in', os.path.join('%input-dir', '%test-basename')),
283288
('%test-proof-diff-out', os.path.join('%output-dir', '%test-basename.proof.out.diff')),

test/output/imp.statistics.out.diff

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
4505
2+
Lbl'-LT-'generatedTop'-GT-'{}(Lbl'-LT-'T'-GT-'{}(Lbl'-LT-'k'-GT-'{}(dotk{}()),Lbl'-LT-'state'-GT-'{}(\left-assoc{}(Lbl'Unds'Map'Unds'{}(Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortId{}, SortKItem{}}(\dv{SortId{}}("s")),inj{SortInt{}, SortKItem{}}(\dv{SortInt{}}("66"))),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortId{}, SortKItem{}}(\dv{SortId{}}("q")),inj{SortInt{}, SortKItem{}}(\dv{SortInt{}}("1"))),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortId{}, SortKItem{}}(\dv{SortId{}}("m")),inj{SortInt{}, SortKItem{}}(\dv{SortInt{}}("2"))),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortId{}, SortKItem{}}(\dv{SortId{}}("r")),inj{SortInt{}, SortKItem{}}(\dv{SortInt{}}("3"))),Lbl'UndsPipe'-'-GT-Unds'{}(inj{SortId{}, SortKItem{}}(\dv{SortId{}}("n")),inj{SortInt{}, SortKItem{}}(\dv{SortInt{}}("1"))))))),Lbl'-LT-'generatedCounter'-GT-'{}(\dv{SortInt{}}("0")))

0 commit comments

Comments
 (0)