Skip to content

Instantly share code, notes, and snippets.

@Sumith1896
Last active May 13, 2016 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sumith1896/979cf662c7833783376e4226a4cff12f to your computer and use it in GitHub Desktop.
Save Sumith1896/979cf662c7833783376e4226a4cff12f to your computer and use it in GitHub Desktop.
Filling DP table in order
package wihtOrb
import leon._
import mem._
import lang._
import annotation._
import com.sun.xml.internal.bind.v2.runtime.reflect.Lister.Pack
import instrumentation._
import invariant._
object orderedFill {
def fillTable(i: BigInt, j: BigInt, m: BigInt, n: BigInt): BigInt = {
require(i >= 0 && j >= 0 && m >= i && n >= j)
if (i == m && j == n)
BigInt(0)
else if(j == n)
fillTable(i + 1, 0, m, n)
else
fillTable(i, j + 1, m, n)
} ensuring (time <= ? * (m - i) * n + ? * (n - j) + ?)
}
@ravimad
Copy link

ravimad commented May 13, 2016

? * (expr) is extracted differently. So it will work

@ravimad
Copy link

ravimad commented May 13, 2016

However, the benchmark still doesn't work. Try increasing UNROLL_BOund in the file leon.invaraint.engine.RefinementEngine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment