Skip to content

Prebuild optimized definition #1002

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

Merged
merged 12 commits into from
Mar 26, 2025

Conversation

ehildenb
Copy link
Member

@ehildenb ehildenb commented Mar 24, 2025

Part of: #977

This PR changes the way we handle options --no-keccak-lemmas and --auxiliary-lemmas so that we do not require building them in at kontrol build ... time. Instead, we prebuild base Kontrol definitions with and without these lemmas in context directly. In particular:

  • The file kontrol.md is added with new build modules, and the corresponding definitions: KONTROL-BASE (no additional lemmas), KONTROL-AUX (with auxiliary lemmas), KONTROL-KECCAK (with the keccak lemmas), and KONTROL-FULL (with both sets of additional lemmas).
  • The corresponding kdist targets for each build module are added.
  • The kontrol build ... process is modified to use the corresponding base defnitiion according to what the user supplies on the CLI instead of building them in dynamically.
  • The cell <schedule> is removed from a rule in no_stack_size_checks.md where it is useless.
  • The generated main module for verification is now KONTROL-MAIN instead of FOUNDRY-MAIN, which means that when extra lemmas are supplied via CLI to kontrol prove ..., that lemmas file needs to be adjusted to import KONTROL-MAIN instead of FOUNDRY-MAIN.

@ehildenb ehildenb self-assigned this Mar 24, 2025
…se build

- Makes new file kontrol.md with module KONTROL-BASE, and adjusts build targets to use this.
- Automatically includes the NO-STACK-CHECKS module and NO-CODE-SIZE-CHECKS module directly into main definition.
…tions for options regarding the extra lemmas to include
@ehildenb ehildenb force-pushed the prebuilt-optimizations branch from 7d215b8 to 6d1eac7 Compare March 25, 2025 15:26
@ehildenb ehildenb marked this pull request as ready for review March 25, 2025 17:21
Copy link
Collaborator

@palinatolmach palinatolmach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Co-authored-by: Palina <[email protected]>
@automergerpr-permission-manager automergerpr-permission-manager bot merged commit c8906a1 into master Mar 26, 2025
11 checks passed
@automergerpr-permission-manager automergerpr-permission-manager bot deleted the prebuilt-optimizations branch March 26, 2025 13:08
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