runtimeverification / wasm-semantics

A Prototype Formal Semantics of WebAssembly in K
Other
74 stars 18 forks source link

Remove #distinctBits. #642

Closed virgil-serbanuta closed 3 weeks ago

virgil-serbanuta commented 3 weeks ago

The following rule matched way too many comparisons, which were transformed by the requires clause into two parallel comparisons and a #distinctBits(VAL1, VAL2) term that would never evaluate to true. The better solution is to match the terms in the main rule, not in #distinctBits, even if that makes the rule a bit uglier.

rule VAL1 +Int VAL2 <Int MAX => true requires VAL1 <Int MAX andBool VAL2 <Int MAX andBool #distinctBits(VAL1, VAL2) [simplification]

Preliminary tests show that this PR likely fixes the main Coindrip performance problems.