-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lemmas on Boolean reasoning, set reasoning, map lookup #2037
Conversation
All of the |
I'm having some formatting issues here as well with the expected outputs. For example, for the I have additional spacing, different order of constraints (ACTUAL top, EXPECTED bottom):
I'm confused, because I would think the way things are printed hasn't been affected by the PR... |
On hold for the moment, waiting for #1866. |
@PetarMax now that the blocking booster PR has been merged, shall we be able to merge it? |
Not yet, the PR is still failing in the booster and passing in the Haskell backend on some tests. I'm trying to figure out what's happening and liaising with @geo2a. |
Co-authored-by: Everett Hildenbrandt <[email protected]>
rule A +Int B <Int C => A <Int C -Int B [concrete(B, C), symbolic(A), simplification(45)] | ||
rule A +Int B <=Int C => A <=Int C -Int B [concrete(B, C), symbolic(A), simplification(45)] | ||
rule A +Int B >Int C => A >Int C -Int B [concrete(B, C), symbolic(A), simplification(45)] | ||
rule A +Int B >=Int C => A >=Int C -Int B [concrete(B, C), symbolic(A), simplification(45)] | ||
|
||
rule A +Int B <Int C => B <Int C -Int A [concrete(A, C), symbolic(B), simplification(45)] | ||
rule A +Int B <=Int C => B <=Int C -Int A [concrete(A, C), symbolic(B), simplification(45)] | ||
rule A +Int B >Int C => B >Int C -Int A [concrete(A, C), symbolic(B), simplification(45)] | ||
rule A +Int B >=Int C => B >=Int C -Int A [concrete(A, C), symbolic(B), simplification(45)] | ||
|
||
rule A -Int B <Int C => A <Int C +Int B [concrete(B, C), symbolic(A), simplification(45)] | ||
rule A -Int B <=Int C => A <=Int C +Int B [concrete(B, C), symbolic(A), simplification(45)] | ||
rule A -Int B >Int C => A >Int C +Int B [concrete(B, C), symbolic(A), simplification(45)] | ||
rule A -Int B >=Int C => A >=Int C +Int B [concrete(B, C), symbolic(A), simplification(45)] | ||
|
||
rule A -Int B <Int C => A -Int C <Int B [concrete(A, C), symbolic(B), simplification(45)] | ||
rule A -Int B <=Int C => A -Int C <=Int B [concrete(A, C), symbolic(B), simplification(45)] | ||
rule A -Int B >Int C => A -Int C >Int B [concrete(A, C), symbolic(B), simplification(45)] | ||
rule A -Int B >=Int C => A -Int C >=Int B [concrete(A, C), symbolic(B), simplification(45)] | ||
|
||
rule A <Int B +Int C => A -Int B <Int C [concrete(A, B), symbolic(C), simplification(45)] | ||
rule A <=Int B +Int C => A -Int B <=Int C [concrete(A, B), symbolic(C), simplification(45)] | ||
rule A >Int B +Int C => A -Int B >Int C [concrete(A, B), symbolic(C), simplification(45)] | ||
rule A >=Int B +Int C => A -Int B >=Int C [concrete(A, B), symbolic(C), simplification(45)] | ||
|
||
rule A <Int B +Int C => A -Int C <Int B [concrete(A, C), symbolic(B), simplification(45)] | ||
rule A <=Int B +Int C => A -Int C <=Int B [concrete(A, C), symbolic(B), simplification(45)] | ||
rule A >Int B +Int C => A -Int C >Int B [concrete(A, C), symbolic(B), simplification(45)] | ||
rule A >=Int B +Int C => A -Int C >=Int B [concrete(A, C), symbolic(B), simplification(45)] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I notice that some of these move the concrete to the left and symbolic to the rgiht, and some the other direction. I wonder if there is benefit to always picking one side of the comparison for the concrete and teh other for the symbolic?
I think there are also some rules somewhere which normalize all _>=_
and _>_
to the other operators (_<=_
and _<_
), so I wonder if we actually don't need all the duplicate rules? Though I can't find those rules now, so maybe they would need to be added.
* lemmas on Boolean reasoning, set reasoning, map lookup, and keccak * Set Version: 1.0.277 * removing keccak lemmas that should not be upstreamed * addressing comments * Set Version: 1.0.278 * Set Version: 1.0.278 * corrections * removing ==Bool from expected files * Set Version: 1.0.279 * Set Version: 1.0.279 * Set Version: 1.0.309 * Set Version: 1.0.311 * updating expected outputs * Set Version: 1.0.312 * Set Version: 1.0.330 * Set Version: 1.0.334 * revisiting set simplifications * --amend * --amend * --amend * streamlining lookup simplifications * streamlining set simplifications * removing set reasoning entirely * Set Version: 1.0.336 * concretising set simplifications: * streamlining set simplifications * Set Version: 1.0.337 * even more concrete set simplifications * bringing old simplifications back * Set Version: 1.0.340 * resolving parsing ambiguities * --amend * --amend * Set Version: 1.0.341 * Set Version: 1.0.342 * Set Version: 1.0.343 * correction * syntax * --amend * Set Version: 1.0.349 * Set Version: 1.0.355 * Set Version: 1.0.356 * Set Version: 1.0.357 * Correctly ordered arguments in `typed_args` (#2174) * Correctly ordered arguments in `typed_args` * Set Version: 1.0.357 --------- Co-authored-by: devops <[email protected]> * Inject `ccopts` directly into `kevm_kompile` and fix some tests (#2164) * Makefile: make sure evm-optimizations-spec is rebuilt on changes to optimizations.md * kproj/optimizations: remove symbolic attribute on evm-optimizations-lemmas * tests/specs/examples/sum-to-n-foundry-spec: correct imports for LLVM backend * tests/specs/functional/infinite-gas-spec.k: allow import of main module in symbolic module for LLVM * kevm-pyk/__main__, Makefile, VERIFICATION: rename kevm {kompile => kompile-spec} for more accurate usage * README: update documentation * kevm-pyk/: all builds require plugin_dir, compute it directly * kevm-pyk/: move calculation of plugin_dir out of run_kompile, pass in ccopts directly * kevm-pyk/__main__: adjust acceptable values for kevm kompile-spec * VERIFICATION: update documentation * Makefile: bring back --target argument * Set Version: 1.0.343 * test_prove: only add ccopts if were using the booster * Set Version: 1.0.355 * package/test-package: add previously failing test of using booster due to plugin_dir being missing * kevm-pyk/__main__: use correct target for kompile-spec * Set Version: 1.0.356 * Set Version: 1.0.356 * kevm-pyk/plugin: correction from code review * kevm-pyk/kdist/plugin: hardcode plugin as dependency for other targets * kevm-pyk/: factor out generic run_kompile from kevm_kompile * kevm_pyk/kompile: rename lib_ccopts => _lib_ccopts * Set Version: 1.0.357 * kevm-pyk/kdist/plugin: make sure all KEVMTarget have plugin as depenndency * Set Version: 1.0.357 * kdist/plugin: drop self._deps * Set Version: 1.0.358 * Set Version: 1.0.358 --------- Co-authored-by: devops <[email protected]> * Fix circular import (#2179) * Fix circular import * Set Version: 1.0.359 --------- Co-authored-by: devops <[email protected]> * Move `--port` arguments to `rpc_args` (#2178) * Move `--port` arguments to `rpc_args` * Set Version: 1.0.359 * Set Version: 1.0.360 --------- Co-authored-by: devops <[email protected]> Co-authored-by: Everett Hildenbrandt <[email protected]> * Update dependency: deps/pyk_release (#2175) * deps/pyk_release: Set Version v0.1.501 * Set Version: 1.0.357 * kevm-pyk/: sync poetry files pyk version v0.1.501 * deps/k_release: sync release file version 6.1.14 * flake.{nix,lock}: update Nix derivations * Set Version: 1.0.359 * kevm-pyk/: sync poetry files pyk version v0.1.501 * Set Version: 1.0.361 --------- Co-authored-by: devops <[email protected]> Co-authored-by: Everett Hildenbrandt <[email protected]> * Update dependency: deps/pyk_release (#2181) * deps/pyk_release: Set Version v0.1.505 * kevm-pyk/: sync poetry files pyk version v0.1.505 * deps/k_release: sync release file version 6.1.20 * flake.{nix,lock}: update Nix derivations * Set Version: 1.0.362 --------- Co-authored-by: devops <[email protected]> * Set Version: 1.0.364 * Set Version: 1.0.364 * Set Version: 1.0.365 * Set Version: 1.0.372 * Set Version: 1.0.379 * adding tests * Set Version: 1.0.381 * normalising comparisons, adding keccak * reverting normalisation * removing equality simplification * Set Version: 1.0.382 * Set Version: 1.0.382 * bringing back comparison (but not equality) normalisation * bringing back equality normalisation * Set Version: 1.0.394 * Set Version: 1.0.396 * Set Version: 1.0.398 * removing unsound keccak simplifying assumptions * Set Version: 1.0.399 * Set Version: 1.0.400 * Set Version: 1.0.406 * Set Version: 1.0.407 * adding tests for comparison normalisation, removing keccak * Update kevm-pyk/src/kevm_pyk/kproj/evm-semantics/serialization.md Co-authored-by: Everett Hildenbrandt <[email protected]> * ----- alignment * Update kevm-pyk/src/kevm_pyk/kproj/evm-semantics/lemmas/lemmas.k --------- Co-authored-by: devops <[email protected]> Co-authored-by: Palina Tolmach <[email protected]> Co-authored-by: Everett Hildenbrandt <[email protected]> Co-authored-by: Tamás Tóth <[email protected]> Co-authored-by: rv-jenkins <[email protected]>
This PR upstreams further lemmas from Lukso/BlockSwap concerning