@@ -7,7 +7,17 @@ kollect() {
7
7
local name=" $1 "
8
8
shift
9
9
echo ' #!/bin/sh' > " $name .sh"
10
- " $@ " --save-temps --dry-run | xargs $KORE /scripts/kollect.sh " $name " >> " $name .sh"
10
+ " $@ " | xargs $KORE /scripts/kollect.sh " $name " >> " $name .sh"
11
+ chmod +x " $name .sh"
12
+ }
13
+
14
+ kollect-file () {
15
+ local name=" $1 "
16
+ local path=" $2 "
17
+ shift 2
18
+ echo ' #!/bin/sh' > " $name .sh"
19
+ " $@ "
20
+ cat $path | xargs $KORE /scripts/kollect.sh " $name " >> " $name .sh"
11
21
chmod +x " $name .sh"
12
22
}
13
23
@@ -32,63 +42,56 @@ build-wasm() {
32
42
generate-evm () {
33
43
cd $KORE /evm-semantics
34
44
35
- kollect test-pop1 \
36
- kevm run --backend haskell \
37
- --mode VMTESTS --schedule DEFAULT \
38
- tests/ethereum-tests/VMTests/vmIOandFlowOperations/pop1.json
39
-
40
- kollect test-add0 env \
41
- kevm run --backend haskell \
42
- --mode VMTESTS --schedule DEFAULT \
43
- tests/ethereum-tests/VMTests/vmArithmeticTest/add0.json \
44
-
45
- kollect test-sumTo10 \
46
- kevm run --backend haskell \
47
- --mode VMTESTS --schedule DEFAULT \
48
- tests/interactive/sumTo10.evm \
45
+ export \
46
+ TEST_CONCRETE_BACKEND=haskell \
47
+ TEST_SYMBOLIC_BACKEND=haskell \
48
+ TEST_OPTIONS=" --dry-run --save-temps" \
49
+ CHECK=true \
50
+ KEEP_OUTPUTS=true
51
+
52
+ local testpop1=tests/ethereum-tests/VMTests/vmIOandFlowOperations/pop1.json
53
+ local testadd0=tests/ethereum-tests/VMTests/vmArithmeticTest/add0.json
54
+ local testsumTo10=tests/interactive/sumTo10.evm
55
+
56
+ kollect-file test-pop1 " $testpop1 .haskell-out" \
57
+ make " $testpop1 .run-interactive" -e
58
+
59
+ kollect-file test-add0 " $testadd0 .haskell-out" \
60
+ make " $testadd0 .run-interactive" -e
61
+
62
+ kollect-file test-sumTo10 $testsumTo10 .haskell-out \
63
+ make " $testsumTo10 .run-interactive" -e
49
64
50
65
for search in \
51
66
branching-no-invalid straight-line-no-invalid \
52
67
branching-invalid straight-line
53
68
do
54
- kollect " test-$search " \
55
- kevm search --backend haskell \
56
- " tests/interactive/search/$search .evm" \
57
- " <statusCode> EVMC_INVALID_INSTRUCTION </statusCode>"
69
+ kollect-file " test-$search " " tests/interactive/search/$search .evm.search-out" \
70
+ make " tests/interactive/search/$search .evm.search" -e
58
71
done
59
72
60
73
kollect test-sum-to-n \
61
- kevm prove --backend haskell \
62
- tests/specs/examples/sum-to-n-spec.k \
63
- VERIFICATION --format-failures
64
-
74
+ make tests/specs/examples/sum-to-n-spec.k.prove -e
75
+
65
76
$KORE /scripts/trim-source-paths.sh * .kore
66
77
}
67
78
68
79
generate-wasm () {
69
80
cd $KORE /wasm-semantics
70
81
82
+ export KPROVE_OPTS=" --dry-run --save-temps"
83
+
71
84
for spec in \
72
85
simple-arithmetic \
73
86
locals \
74
- loops
87
+ loops \
88
+ memory \
89
+ wrc20
75
90
do
76
91
kollect " test-$spec " \
77
- ./kwasm prove --backend haskell \
78
- tests/proofs/" $spec " -spec.k \
79
- KWASM-LEMMAS
92
+ make tests/proofs/" $spec " -spec.k.prove -e
80
93
done
81
94
82
- kollect " test-memory" \
83
- ./kwasm prove --backend haskell \
84
- tests/proofs/memory-spec.k \
85
- KWASM-LEMMAS \
86
- --concrete-rules WASM-DATA.wrap-Positive,WASM-DATA.setRange-Positive,WASM-DATA.getRange-Positive
87
-
88
- kollect " test-wrc20" \
89
- ./kwasm prove --backend haskell tests/proofs/wrc20-spec.k WRC20-LEMMAS --format-failures \
90
- --concrete-rules WASM-DATA.wrap-Positive,WASM-DATA.setRange-Positive,WASM-DATA.getRange-Positive,WASM-DATA.get-Existing,WASM-DATA.set-Extend
91
-
92
95
$KORE /scripts/trim-source-paths.sh * .kore
93
96
}
94
97
0 commit comments