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

Option --extra-module for including lemmas modules dynamically in kontrol prove #883

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ehildenb
Copy link
Member

@ehildenb ehildenb commented Nov 12, 2024

Blocked on: runtimeverification/k#4681
Blocked on: runtimeverification/evm-semantics#2654

Part of: #149

This adds an option to kontrol prove called --extra-module <FILE_NAME>:<MODULE_NAME> which allow specifying an extra file with a module that contains new lemmas to be included in the proof context dynamically.

This will allow a user to, for example, remove a node corresponding to a spurious branch and re-run through that node with an additional body of lemmas to see if that body of lemmas allows pruning the branch without rebuilding the whole project.

Currently, this does add something like 40s to prove time to parse the additional module, which I guess is better than the overhead associated with kontrol build ... anyway.

extra_lemmas_module = single(module for module in modules.modules if module.name == extra_module_name)
non_rule_sentences = [sent for sent in extra_lemmas_module.sentences if not isinstance(sent, KRule)]
if non_rule_sentences:
raise ValueError(f'Supplie --extra-module contains non-Rule sentences: {non_rule_sentences}')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
raise ValueError(f'Supplie --extra-module contains non-Rule sentences: {non_rule_sentences}')
raise ValueError(f'Supplied --extra-module contains non-Rule sentences: {non_rule_sentences}')

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