Skip to content
Snippets Groups Projects
Commit 6f55aea9 authored by Ali Sinan Köksal's avatar Ali Sinan Köksal
Browse files

example

parent 072324f8
No related branches found
No related tags found
No related merge requests found
...@@ -125,12 +125,12 @@ object RedBlackTree { ...@@ -125,12 +125,12 @@ object RedBlackTree {
val defaultBound = 3 val defaultBound = 3
val bound = if (args.isEmpty) defaultBound else args(0).toInt val bound = if (args.isEmpty) defaultBound else args(0).toInt
// enumerateAllUpTo(bound) enumerateAllUpTo(bound)
val solutionSet = scala.collection.mutable.Set[Tree]() val solutionSet = scala.collection.mutable.Set[Tree]()
println("Fixing size of trees to " + (bound + 1)) println("Fixing size of trees to " + (bound))
Timer.go Timer.go
for (tree <- findAll((t : Tree) => isRedBlackTree(t) && boundValues(t, bound) && size(t) == bound + 1)) { for (tree <- findAll((t : Tree) => isRedBlackTree(t) && boundValues(t, bound - 1) && size(t) == bound)) {
solutionSet += tree solutionSet += tree
} }
Timer.stop Timer.stop
......
#!/bin/bash #!/bin/bash
LD_LIBRARY_PATH=lib-bin \ LD_LIBRARY_PATH=lib-bin \
JAVA_OPTS="-Xmx512M -Xms512M -Xss256M" \
scala -classpath bin/purescala/purescala-definitions_2.8.1-1.0.jar:lib/z3.jar:bin/cp/constraint-programming-plugin_2.8.1-1.0.jar:out ${@} scala -classpath bin/purescala/purescala-definitions_2.8.1-1.0.jar:lib/z3.jar:bin/cp/constraint-programming-plugin_2.8.1-1.0.jar:out ${@}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment