Proofs for non-terminating programs loop in `pyk prove`

Open
#4,175 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Reproduce the behavior from the prove-problem branch in scratch/prove-problem, using the pyk prove command and comparing it with kprove using legacy kore-exec. Investigate the proof execution path for the terminating-branch and while true {} cases; done means non-terminating proofs no longer loop silently and the user receives an appropriate warning or failure.

Written by the indexing model from the issue text.

Description

pyk

Branch prove-problem contains an example of a proof (in directory scratch/prove-problem) for a small IMP-like language.

The proof claim states a property of a while loop but the loop is not guaranteed to terminate by the given path condition.
This is not acknowledged by the pyk prove utility (nor by kprove using legacy kore-exec).
In particular:

  1. If there is an execution branch which terminates in the target state, the proof is considered as passing.
  2. If none of the execution branches are terminating (for instance, using a simple while true {} as the program), the pyk proof command loops (and kprove considers the proof as passing).

While 1) is probably OK (considering that the proof is only partial), 2) is clearly undesirable. There might be ways to detect when the exact same state is reached again while executing a program (detecting the infinite loop), and a warning could be issued to the user, at least in simple cases.

Dominant language
Python
Stars
591
Forks
163
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from runtimeverification/k

All issues in runtimeverification/k

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.