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

Termination plugin incompleteness with let-expressions #797

Open
marcoeilers opened this issue May 15, 2024 · 0 comments
Open

Termination plugin incompleteness with let-expressions #797

marcoeilers opened this issue May 15, 2024 · 0 comments

Comments

@marcoeilers
Copy link
Contributor

For the following program, both backends report that len might not terminate:

field elem: Int
field nxt: Ref
predicate ll(r: Ref) {
    acc(r.elem) && acc(r.nxt) && (r.nxt != null ==> let rn == (r.nxt) in ll(rn))
}
function len(r: Ref): Int
    requires ll(r)
    decreases ll(r)
{
    unfolding ll(r) in (r.nxt == null ? 0 : 1 + len(r.nxt))
}

The program verifies if the let expression is removed and ll(rn) is replaced by ll(r.nxt).

Reported by @Aurel300, found by a PV student.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant