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

Definitions of function applications in postconditions of recursively called functions available too late #744

Closed
marcoeilers opened this issue Aug 21, 2023 · 1 comment

Comments

@marcoeilers
Copy link
Contributor

The following verifies in Carbon but not in Silicon:

function fac(i: Int): Int
  ensures ge(result, 1)
{
  i <= 1 ? 1 : i * fac(i - 1)
}

function ge(i1: Int, i2: Int): Bool
{
  i1 >= i2
}

The issue is that the precondition propagation axiom for fac (which states that if the precondition of fac is satisfied, then the precondition of ge in its postcondition is also satisfied) is not available while verifying the body of fac, and thus the definition of ge cannot be used when learning the postcondition of the recursive call.

marcoeilers added a commit that referenced this issue Aug 21, 2023
@marcoeilers
Copy link
Contributor Author

Fixed in PR #745

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