You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add #wrap rules corresponding to modInt Rules
* Fix existential variable
* More wrapping rules
* WIP: Add speed-up lemma
Causes infinite loop, it seems, not actually a speed up. Not worth
investigating, I think, at least for now.
* Clean up general lemmas
* Start moving exact values in simplifications to side conditions
* Simplify modInts to #wraps
* Bugfix: missing syntax production
* Make setRange total
* New #getRange lemmas
* Formatting
* Remove the loop-lemma, not giving any speed-up
* Formatting
* Documentation update
* Remove unused and bad lemma, caused branching
* Nits
* Update lemmas
* Fix side condition
* Remove commented out lemma
* Specilalize #getRange lemma
* Fix getRange side conditions for when WIDTH <= 0
* Typo in annotation
Co-authored-by: ehildenb <[email protected]>
This conversion turns out to be helpful in this particular proof, but we don't want to apply it on all KWasm proofs.
17
+
These conversions turns out to be helpful in this particular proof, but we don't want to apply it on all KWasm proofs.
18
18
19
19
```k
20
-
rule X /Int 256 => X >>Int 8
20
+
rule X /Int N => X >>Int 8 requires N ==Int 256 [simplification]
21
21
```
22
22
23
-
TODO: The two `#get` theorems below theorems handle special cases in this proof, but we should be able to use some more general theorems to prove them.
23
+
TODO: The `#get` theorems below theorems handle special cases in this proof, but we should be able to use some more general theorems to prove them.
TODO: The following theorems should be generalized and proven, and moved to the set of general lemmas.
31
42
Perhaps using `requires N ==Int 2 ^Int log2Int(N)`?
43
+
Also, some of these have concrete integers on the LHS.
44
+
It may be better to use a symbolic value as a side condition, e.g. `rule N => foo requires N ==Int 8`, because simplifications rely on exact matching of the LHS.
32
45
33
46
```k
34
47
rule X *Int 256 >>Int N => (X >>Int (N -Int 8)) requires N >=Int 8 [simplification]
@@ -54,6 +67,13 @@ Perhaps using `requires N ==Int 2 ^Int log2Int(N)`?
54
67
andBool X <Int 256
55
68
andBool M >=Int 8
56
69
[simplification]
70
+
71
+
rule #wrap(N, (X +Int (Y <<Int M))) => X +Int (#wrap(N, Y <<Int M))
72
+
requires N >=Int 8
73
+
andBool 0 <=Int X
74
+
andBool X <Int 256
75
+
andBool M >=Int 8
76
+
[simplification]
57
77
```
58
78
59
79
TODO: The following theorem should be proven, and moved to the set of general lemmas.
0 commit comments