Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Add proof exploration and display options to CLI #1043

Closed
wants to merge 17 commits into from

Conversation

ehildenb
Copy link
Member

@ehildenb ehildenb commented Mar 28, 2024

This PR is for making it easier to work on proofs with default pyk prove ... functionalities.

  • Factor out and reuse SpecOptions in ProveOptions class.
  • Add options to pyk prove:
    • --max-iterations: control how many iterations of proof extension to do.
    • --max-depth: control the maximum number of steps to take in an execute request.
    • --save-directory: allow saving off the proof state after executing it.
    • --temp-directory: allow setting the temporary directory to use for intermediate artifacts.
    • --show-kcfg: display the resulting proof KCFG after executing the proof.
    • Handle the RuntimeError thrown by crashes of the call to kprove --dry-run ... directly and more gracefully, instead of printing a stack trace.
  • Add command pyk show which reuses a lot of the same options as pyk prove, and calls pyk prove in a way that it just loads the proof from disk and displays the KCFG.
  • Changes to the KProve.prove_rpc functionality:
    • Source many of the options from the ProveOptions class, which contains the above options and more.
    • Only initialize a CTermSymbolic (and thus an RPC server) if it's needed (will take more than 0 proof steps, and the proof isn't already passed).
    • Allow setting the prefix of the temporary file parsed to for get_claims_modules.
  • Modify a test in regression-new to exercise the new pyk prove --show-kcfg ... option.

@ehildenb ehildenb force-pushed the proof-functionalities branch from 2a3b4fe to 17e88ae Compare April 3, 2024 21:00
@ehildenb ehildenb changed the title Add options for manipulating proofs from CLI Add options for displaying proof information from the CLI Apr 3, 2024
@ehildenb ehildenb changed the title Add options for displaying proof information from the CLI Add proof exploration and display options to CLI Apr 3, 2024
@Baltoli
Copy link
Contributor

Baltoli commented Apr 13, 2024

@Baltoli Baltoli closed this Apr 13, 2024
@Baltoli Baltoli deleted the proof-functionalities branch April 13, 2024 07:05
rv-jenkins pushed a commit to runtimeverification/k that referenced this pull request Apr 16, 2024
Transfer of: runtimeverification/pyk#1043

This PR is for making it easier to work on proofs with default `pyk
prove ...` functionalities.

- Factor out and reuse `SpecOptions` in `ProveOptions` class.
- Add options to `pyk prove`:
- `--max-iterations`: control how many iterations of proof extension to
do.
- `--max-depth`: control the maximum number of steps to take in an
`execute` request.
- `--save-directory`: allow saving off the proof state after executing
it.
- `--temp-directory`: allow setting the temporary directory to use for
intermediate artifacts.
- `--show-kcfg`: display the resulting proof KCFG after executing the
proof.
- Handle the `RuntimeError` thrown by crashes of the call to `kprove
--dry-run ...` directly and more gracefully, instead of printing a stack
trace.
- Add command `pyk show` which reuses a lot of the same options as `pyk
prove`, and calls `pyk prove` in a way that it just loads the proof from
disk and displays the KCFG.
- Changes to the `KProve.prove_rpc` functionality:
- Source many of the options from the `ProveOptions` class, which
contains the above options and more.
- Only initialize a `CTermSymbolic` (and thus an RPC server) if it's
needed (will take more than 0 proof steps, and the proof isn't already
passed).
- Allow setting the prefix of the temporary file parsed to for
`get_claims_modules`.
- Modify a test in `regression-new` to exercise the new `pyk prove
--show-kcfg ...` option.

---------

Co-authored-by: Everett Hildenbrandt <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants