Directly construct KCFGs in foundry-kompile - #1377
Merged
Merged
Conversation
ehildenb
marked this pull request as ready for review
September 16, 2022 03:09
tothtamas28
approved these changes
Sep 16, 2022
RaoulSchaffranek
approved these changes
Sep 16, 2022
Comment on lines
-157
to
-159
| _spec_module = KFlatModule( | ||
| spec_module if spec_module else 'SPEC', [], [KImport(mname) for mname in [_m.name for _m in claims_modules]] | ||
| ) |
Member
There was a problem hiding this comment.
What's the reason behind removing the spec module? Is it to separate the auto-generated rules from the hand-written claims?
Member
Author
There was a problem hiding this comment.
Just to reduce the output size since we aren't using the claims anymore to make the input specifications. The KCFGs are stored structurally (instead of textual claims), and then when we want to run the proof, the KCFG is written as a claim to a file for calling KProve on.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #1374
This makes a series of small improvements:
kcfgs.jsonfrom the Foundry output, instead of turning into K specs and then turning back into KCFGs after. As such, we can skip thekprove --dry-run --emit-json-spec ...step, and remove--reparseargument. Optionsspec_moduleandparsed_spec..Bag.--depthtokevm foundry-prove ..., so you can inspect intermediate states.--[no-]minimizetokprove_args, which means we by default minimize the proof output, but give the option to not minimize with--no-minimize.symbolattribute to generated productions forcontract_to_k, so that we can be sure the klabels will be exactly how we generate them.--lemmatokprove_args, so that users can pass in lemmas on the CLI to use for simplification.