stainless icon indicating copy to clipboard operation
stainless copied to clipboard

VC timeout for Z3 in incremental mode

Open jad-hamza opened this issue 3 years ago • 0 comments

This is an example that seems to be solved by Z3 in non-incremental mode, but times out with incremental mode. We can add it to the test suite if we switch.

import stainless.annotation._
import stainless.lang._

object IfProp {
  @extern
  def prop(j: Int): Boolean = {
    (??? : Boolean)
  }

  def gg(cond: Boolean, x1: Int, x2: Int): Unit = {
    require(
      x1 >= 0 &&
      x2 >= 0 &&
      prop(x1 - 1) &&
      prop(x2 - 1)
    )

    val x = if (cond) x1 else x2
    assert(prop(x - 1))
  }
}

jad-hamza avatar Apr 12 '21 09:04 jad-hamza