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

Allow decreases classes to prove termination #1233

Open
karthikbhargavan opened this issue Jan 15, 2025 · 0 comments
Open

Allow decreases classes to prove termination #1233

karthikbhargavan opened this issue Jan 15, 2025 · 0 comments

Comments

@karthikbhargavan
Copy link
Contributor

In recursive functions like the following, F* is not able to automatically prove termination.

fn f(x:usize, n:usize) { 
    if x < n {
        f (x+1,n)
    }
}

Open this code snippet in the playground

Consequently, we would like to be able to annotate the Rust code with a decreases clause of the form:

#[hax_lib::decreases(n - x)]

This would allow F* to automatically prove termination.

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

No branches or pull requests

1 participant