From 3768913b2b79fde201b7a3d354849d4a0e5731aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ali=20Sinan=20K=C3=B6ksal?= <alisinan@gmail.com>
Date: Sun, 10 Jul 2011 23:02:39 +0000
Subject: [PATCH] bugfix for lazySolve involving guards

---
 src/cp/Terms.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cp/Terms.scala b/src/cp/Terms.scala
index 37c590639..04a78daac 100644
--- a/src/cp/Terms.scala
+++ b/src/cp/Terms.scala
@@ -66,7 +66,7 @@ object Terms {
     GlobalContext.initializeIfNeeded(constraint.program)
 
     val newGuards = newConsts map (nc => FreshIdentifier("live", true).setType(BooleanType))
-    newGuards foreach GlobalContext.addLive
+    (newConsts zip newGuards) map { case (nc, ng) => GlobalContext.addGuard(List(nc), ng) }
 
     val toAssert = Implies(Or(newGuards map (ng => Variable(ng))), newExpr)
     if (GlobalContext.checkAssumptions(toAssert)) {
-- 
GitLab