From 6f55aea9dc8b031b7efce1c348bf9eef91efe355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ali=20Sinan=20K=C3=B6ksal?= <alisinan@gmail.com> Date: Wed, 20 Apr 2011 09:26:22 +0000 Subject: [PATCH] example --- cp-demo/RedBlackTree.scala | 6 +++--- cp-runner | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cp-demo/RedBlackTree.scala b/cp-demo/RedBlackTree.scala index 5248d4ba6..c79411d4a 100644 --- a/cp-demo/RedBlackTree.scala +++ b/cp-demo/RedBlackTree.scala @@ -125,12 +125,12 @@ object RedBlackTree { val defaultBound = 3 val bound = if (args.isEmpty) defaultBound else args(0).toInt - // enumerateAllUpTo(bound) + enumerateAllUpTo(bound) val solutionSet = scala.collection.mutable.Set[Tree]() - println("Fixing size of trees to " + (bound + 1)) + println("Fixing size of trees to " + (bound)) 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 } Timer.stop diff --git a/cp-runner b/cp-runner index 365392426..aabc3c235 100755 --- a/cp-runner +++ b/cp-runner @@ -1,5 +1,4 @@ #!/bin/bash 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 ${@} -- GitLab