Skip to content
Snippets Groups Projects
Commit ac7f1e45 authored by Philippe Suter's avatar Philippe Suter
Browse files

still some infinite loop on some unrollings (eg. pldi/InsertionSort:min), but...

still some infinite loop on some unrollings (eg. pldi/InsertionSort:min), but some examples are solved. yay.

parent 88d092bf
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -65,11 +65,11 @@ object RedBlackTree {
makeBlack(ins(x, t))
} ensuring (res => content(res) == content(t) ++ Set(x) && redNodesHaveBlackChildren(res))
def buggyAdd(x: Int, t: Tree): Tree = {
require(redNodesHaveBlackChildren(t))
// makeBlack(ins(x, t))
ins(x, t)
} ensuring (res => content(res) == content(t) ++ Set(x) && redNodesHaveBlackChildren(res))
// def buggyAdd(x: Int, t: Tree): Tree = {
// require(redNodesHaveBlackChildren(t))
// // makeBlack(ins(x, t))
// ins(x, t)
// } ensuring (res => content(res) == content(t) ++ Set(x) && redNodesHaveBlackChildren(res))
def balance(c: Color, a: Tree, x: Int, b: Tree): Tree = {
require(
......
......@@ -48,7 +48,7 @@ class FunCheckProject(info: ProjectInfo) extends DefaultProject(info) with FileT
fw.write(plugin.jarPath.absolutePath)
fw.write("\"" + nl + nl)
fw.write("LD_LIBRARY_PATH=" + ("." / "lib-bin").absolutePath + " \\" + nl)
fw.write("java \\" + nl)
fw.write("java -Xmx1024M \\" + nl)
// This is a hack :(
val libStr = (buildLibraryJar.absolutePath).toString
......
This diff is collapsed.
......@@ -654,6 +654,19 @@ object Trees {
treeCatamorphism(convert, combine, compute, expr)
}
def topLevelFunctionCallsOf(expr: Expr) : Set[FunctionInvocation] = {
def convert(t: Expr) : Set[FunctionInvocation] = t match {
case f @ FunctionInvocation(_, _) => Set(f)
case _ => Set.empty
}
def combine(s1: Set[FunctionInvocation], s2: Set[FunctionInvocation]) = s1 ++ s2
def compute(t: Expr, s: Set[FunctionInvocation]) = t match {
case f @ FunctionInvocation(_, _) => Set(f) // ++ s that's the difference with the one below
case _ => s
}
treeCatamorphism(convert, combine, compute, expr)
}
def functionCallsOf(expr: Expr) : Set[FunctionInvocation] = {
def convert(t: Expr) : Set[FunctionInvocation] = t match {
case f @ FunctionInvocation(_, _) => Set(f)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment