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

Imperative code elimination, block lifting #30

Closed
jad-hamza opened this issue May 10, 2017 · 1 comment
Closed

Imperative code elimination, block lifting #30

jad-hamza opened this issue May 10, 2017 · 1 comment

Comments

@jad-hamza
Copy link
Contributor

import stainless.lang._

object Test {
  def falseTheorem() = {
    false 
  } holds

  def test() = {
    val x = {
      falseTheorem()
      0
    }
    false 
  } holds
}

The verification condition for the post-condition of test is:

val tmp: Boolean = falseTheorem
val x: Int = 0
false

Would it be possible to just have the last two lines, without val tmp?
This would make the invocation of falseTheorem invisible to the solver for
proving the post-condition of test.
This way, we can have more control of what is visible in the path for the solvers.

I guess this comes from the ImperativeCodeElimination trait, that lifts value outside blocks?
I'll have a look

@samarion
Copy link
Member

I don't think this is an issue anymore now that the simplifier drops such tmp values. Closing the issue.

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

2 participants