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

Allow introducing semantic rules in kprove #4772

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

ehildenb
Copy link
Member

Part of: runtimeverification/kontrol#977

Currently, kprove does not allow including new semantic rules in the definition that is being proven, only claims and simplification 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 that kprove ... can be used just to parse some modules basically.

In pyk, we add --allow-new-rules to KProve.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.

@ehildenb ehildenb self-assigned this Mar 15, 2025
@ehildenb ehildenb changed the title Allow new new semantic rules in kprove with appropriate flag Allow introducing semantic rules in kprove Mar 15, 2025
@ehildenb
Copy link
Member Author

I was waiting for more features to emerge that I need, but I think this will do for now!

@ehildenb ehildenb marked this pull request as ready for review March 20, 2025 22:13
@@ -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",
Copy link
Contributor

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'],
Copy link
Contributor

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.

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.

2 participants