-
Notifications
You must be signed in to change notification settings - Fork 151
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
Directly construct KCFGs in foundry-kompile #1377
Conversation
_spec_module = KFlatModule( | ||
spec_module if spec_module else 'SPEC', [], [KImport(mname) for mname in [_m.name for _m in claims_modules]] | ||
) |
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.
What's the reason behind removing the spec module? Is it to separate the auto-generated rules from the hand-written claims?
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.
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.
Fixes: #1374
This makes a series of small improvements:
kcfgs.json
from 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--reparse
argument. Optionsspec_module
andparsed_spec
..Bag
.--depth
tokevm foundry-prove ...
, so you can inspect intermediate states.--[no-]minimize
tokprove_args
, which means we by default minimize the proof output, but give the option to not minimize with--no-minimize
.symbol
attribute to generated productions forcontract_to_k
, so that we can be sure the klabels will be exactly how we generate them.--lemma
tokprove_args
, so that users can pass in lemmas on the CLI to use for simplification.