Skip to content
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

Inject ccopts directly into kevm_kompile and fix some tests #2164

Merged
merged 32 commits into from
Nov 15, 2023

Conversation

ehildenb
Copy link
Member

@ehildenb ehildenb commented Nov 8, 2023

This PR is pulled out of: #2144

In particular:

  • A few proof tests that do not kompile properly with LLVM backend library because of shadowed module imports (due to symbolic attribute) are fixed.
  • The command kevm kompile ... is renamed to kevm kompile-spec ..., which is more representative of what it does. It defaults to --target haskell-booster, but only accepts haskell,haskell-booster,maude.
  • The kevm_kompile command no longer takes plugin_dir as an argument, but instead relies on user to pass in ccopts directly, which is all plugin_dir was used to calculate. This calculation is done at the call-site now instead, which makes kevm_kompile more generic (removes semantics specific component), and barely changes the call-sites.
  • The Makefile system is adjusted to make sure that evm-optimizations-spec.md is correctly updated on changes.
  • Adds a test to package/test-package.sh that was previously failing of using the booster on a proof. This was failing because we weren't correctly setting the plugin_dir (and thus ccopts) when using the booster at spec compile time. This was missed because the pytest testing harness did inject this option.

@ehildenb ehildenb self-assigned this Nov 8, 2023
@ehildenb ehildenb marked this pull request as ready for review November 13, 2023 16:36
kevm-pyk/src/kevm_pyk/kdist/plugin.py Outdated Show resolved Hide resolved
kevm-pyk/src/kevm_pyk/__main__.py Outdated Show resolved Hide resolved
kevm-pyk/src/kevm_pyk/kdist/plugin.py Outdated Show resolved Hide resolved
@rv-jenkins rv-jenkins merged commit 0f62d62 into master Nov 15, 2023
11 checks passed
@rv-jenkins rv-jenkins deleted the inject-ccopts branch November 15, 2023 18:02
PetarMax pushed a commit that referenced this pull request Nov 20, 2023
* 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 <devops@runtimeverification.com>
PetarMax added a commit that referenced this pull request Dec 22, 2023
* 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 <devops@runtimeverification.com>

* 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 <devops@runtimeverification.com>

* Fix circular import (#2179)

* Fix circular import

* Set Version: 1.0.359

---------

Co-authored-by: devops <devops@runtimeverification.com>

* 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 <devops@runtimeverification.com>
Co-authored-by: Everett Hildenbrandt <everett.hildenbrandt@gmail.com>

* 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 <devops@runtimeverification.com>
Co-authored-by: Everett Hildenbrandt <everett.hildenbrandt@gmail.com>

* 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 <devops@runtimeverification.com>

* 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 <everett.hildenbrandt@gmail.com>

* ----- alignment

* Update kevm-pyk/src/kevm_pyk/kproj/evm-semantics/lemmas/lemmas.k

---------

Co-authored-by: devops <devops@runtimeverification.com>
Co-authored-by: Palina Tolmach <polina.tolmach@gmail.com>
Co-authored-by: Everett Hildenbrandt <everett.hildenbrandt@gmail.com>
Co-authored-by: Tamás Tóth <tothtamas28@users.noreply.github.com>
Co-authored-by: rv-jenkins <admin@runtimeverification.com>
PetarMax added a commit that referenced this pull request Dec 27, 2023
* 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 <devops@runtimeverification.com>

* 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 <devops@runtimeverification.com>

* Fix circular import (#2179)

* Fix circular import

* Set Version: 1.0.359

---------

Co-authored-by: devops <devops@runtimeverification.com>

* 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 <devops@runtimeverification.com>
Co-authored-by: Everett Hildenbrandt <everett.hildenbrandt@gmail.com>

* 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 <devops@runtimeverification.com>
Co-authored-by: Everett Hildenbrandt <everett.hildenbrandt@gmail.com>

* 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 <devops@runtimeverification.com>

* 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 <everett.hildenbrandt@gmail.com>

* ----- alignment

* Update kevm-pyk/src/kevm_pyk/kproj/evm-semantics/lemmas/lemmas.k

---------

Co-authored-by: devops <devops@runtimeverification.com>
Co-authored-by: Palina Tolmach <polina.tolmach@gmail.com>
Co-authored-by: Everett Hildenbrandt <everett.hildenbrandt@gmail.com>
Co-authored-by: Tamás Tóth <tothtamas28@users.noreply.github.com>
Co-authored-by: rv-jenkins <admin@runtimeverification.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants