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

Support a module mode that verifies the contained proofs are in EPR and if so, enables the mbqi quant. instantiation strategy #1000

Draft
wants to merge 34 commits into
base: main
Choose a base branch
from

Conversation

GenericMonkey
Copy link
Contributor

Changes

Attributes

  • Add a module-level attribute #[verifier::epr_check] to run the EPR checker on all proofs in a particular module.
    • This module also enables options to turn on MBQI for the quantifiers in this module.
  • Add verifier::inline_only attribute to suppress generation of the function body in the Verification Condition
  • Add #![no_triggers] trigger annotation to produce an empty pattern. Together with pi.enabled this will effectively eliminate trigger based instantiation for the given quantifier (i.e. MBQI only)

EPR Core Logic

  • Added new file alternation_check.rs that runs a 3 pass check for quantifier alternation.
    • First pass to check if all features used in module are supported in EPR
    • Second pass to collect all recursively mentioned spec functions
    • Third pass to construct the edges in the quantifier alternation graph
  • Augment pruning logic in prune.rs to also return a boolean saying all reached types are opaque datatypes.
  • Add a new EPR-friendly prelude that is produced when the module is decorated with epr_check

Testing

  • Added epr.rs to test harness to test interesting cases of the quantifier alternation graph generation
  • Add delmap_epr.rs to examples/ to further test feature and show an example of code organization around the EPR feature

utaal and others added 30 commits February 16, 2024 15:10
- plumbing of errors
- add tests into harness
Co-Authored-By: GenericMonkey <pransrin@umich.edu>
@GenericMonkey GenericMonkey marked this pull request as draft February 19, 2024 11:07
@tjhance
Copy link
Collaborator

tjhance commented Feb 19, 2024

What's the difference between inline and inline_only? Is the original inline conditional on something?

@utaal-b utaal-b changed the title [Feature] EPR Checker Support a module mode that verifies the contained proofs are in EPR and if so, enables the mbqi quant. instantiation strategy Feb 20, 2024
@GenericMonkey
Copy link
Contributor Author

What's the difference between inline and inline_only? Is the original inline conditional on something?

I think the original inline will not suppress the creation of the function definition in the VC. Since we care about reducing the QA graph by eliminating the function defn (defn(x) <==> body), we added this option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants