runtimeverification / runtimeverification/kontrol
Make proof function prefix configurable
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 122
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Originally posted by @tothtamas28 in https://github.com/runtimeverification/kontrol/pull/249#discussion_r1450000491
The logic for deciding what sort of KCFG to construct based on the function name (e.g., starting with test, prove, etc.) should be pulled up from the _method_to_cfg function, and is_test and failing should become parameters.
Halmos allows specifying the function name using the following argument, and we can do the same thing, introducing, e.g., --function and --fail-function as the first step:
parser.add_argument(
"--function",
metavar="FUNCTION_NAME_PREFIX",
default="check_",
help="run tests matching the given prefix. Shortcut for `--match-test '^{PREFIX}'`. (default: '%(default)s')",
)
On the other hand, as also noted by @tothtamas28, proof name prefix is not something that's likely to change between kontrol prove calls so we may not want to expose it on the CLI.
As a better alternative, proof_prefixes is the sort of thing that should be configurable through a configuration file. If it doesn't break Foundry we can consider adding a section to foundry.toml (e.g., [kontrol] or [symbolic]), which won't break Foundry but will throw a warning:
warning: Found unknown config section in foundry.toml: [kontrol]
This notation for profiles has been deprecated and may result in the profile not being registered in future versions.
Please use [profile.kontrol] instead or run `forge config --fix`.
Otherwise, maybe its time to introduce kontrol.toml. This would enable cleaning up the CLI a bit as well. We have this issue on our roadmap for February, but it can also be picked up earlier if we have the bandwidth.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/kontrol/prove.py and the _method_to_cfg function referenced in the issue. Trace how function names determine KCFG construction and where prove CLI arguments or configuration are defined. The issue is not settled on CLI options versus foundry.toml or kontrol.toml, so done requires choosing and implementing a configuration path for proof prefixes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100