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

ApplyLetRec arguments are not properly mapped in postconditions #1159

Closed
jad-hamza opened this issue Sep 10, 2021 · 0 comments
Closed

ApplyLetRec arguments are not properly mapped in postconditions #1159

jad-hamza opened this issue Sep 10, 2021 · 0 comments

Comments

@jad-hamza
Copy link
Contributor

The inside function is accepted by Stainless.

import stainless.lang._

object Test {

  def foo(): Unit = {
    var i = 0
    def isZero = i == 0

    def inside: Unit = {
      require(i <= 10)
      i += 1
    }.ensuring(_ =>
      isZero
    )

    inside
  }

}

The call isZero is transformed to isZero(i) where i refers to the initial value of i instead of the new value.

jad-hamza added a commit to jad-hamza/stainless that referenced this issue Sep 10, 2021
jad-hamza added a commit to jad-hamza/stainless that referenced this issue Sep 10, 2021
jad-hamza added a commit to jad-hamza/stainless that referenced this issue Sep 10, 2021
mario-bucev added a commit to mario-bucev/stainless that referenced this issue Mar 15, 2022
mario-bucev added a commit to mario-bucev/stainless that referenced this issue Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants