From de153283a355ec33f555a9a4ddf17fdaf8657013 Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Thu, 15 Jan 2009 18:39:08 +0000 Subject: [PATCH] Stopped duplicate background knowledge being added in the equation generation, thus fixing some tests --- checks/ArrayUsageCheck.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checks/ArrayUsageCheck.hs b/checks/ArrayUsageCheck.hs index 195d65b..6a2c796 100644 --- a/checks/ArrayUsageCheck.hs +++ b/checks/ArrayUsageCheck.hs @@ -580,8 +580,8 @@ squareAndPair :: (EqualityConstraintEquation, EqualityConstraintEquation) -> [((labelStripped, labelStripped), VarMap, (EqualityProblem, InequalityProblem))] squareAndPair lookupBK strip repVars s v lh - = [(transformPair strip strip labels, s,squareEquations (bkEqA ++ bkEqB ++ - eq, bkIneqA ++ bkIneqB ++ ineq ++ concat (applyAll (eq,ineq) (map addExtra repVars)))) + = [(transformPair strip strip labels, s,squareEquations (nub (bkEqA ++ bkEqB) ++ + eq, nub (bkIneqA ++ bkIneqB) ++ ineq ++ concat (applyAll (eq,ineq) (map addExtra repVars)))) | (labels, eq,ineq) <- pairEqsAndBounds v lh ,and (map (primeImpliesPlain (eq,ineq)) repVars) ,((bkEqA, bkIneqA), (bkEqB, bkIneqB)) <-