-
Notifications
You must be signed in to change notification settings - Fork 153
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
Allow introducing semantic rules in kprove #4772
base: develop
Are you sure you want to change the base?
Conversation
…user to specify that they want to allow new rules in a proof module
I was waiting for more features to emerge that I need, but I think this will do for now! |
@@ -113,4 +113,10 @@ public synchronized File specFile(FileUtil files) { | |||
description = "Allow functional claims to be printed in kore format. Use with --dry-run.", | |||
hidden = true) | |||
public boolean allowFuncClaims = false; | |||
|
|||
@Parameter( | |||
names = "--allow-new-rules", |
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.
I'd just call it --allow-rules
to make it shorter.
@@ -274,7 +274,7 @@ def parse_modules( | |||
temp_dir=self.use_directory, | |||
dry_run=True, | |||
type_inference_mode=type_inference_mode, | |||
args=['--emit-json-spec', ntf.name], | |||
args=['--emit-json-spec', ntf.name, '--allow-new-rules'], |
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.
Consider adding an integration test.
Part of: runtimeverification/kontrol#977
Currently,
kprove
does not allow including new semantic rules in the definition that is being proven, only claims andsimplification
rules. This change allows the user to set a flag--allow-new-rules
which disables this check. The intention is for it to be used with--dry-run
, so thatkprove ...
can be used just to parse some modules basically.In pyk, we add
--allow-new-rules
toKProve.parse_module(...)
invocation, so that it can parse new modules that introduce semantic rules. This enables us to use those new rules in the haskell backend booster when doing proofs with Kontrol, which is key to loading loop invariants dynamically to support runtimeverification/kontrol#977.