From: jjenista Date: Fri, 12 Mar 2010 20:11:01 +0000 (+0000) Subject: if an operation on canonical objects wants to use other canonical ops, it must supply... X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c4a5797ec01aea66f4a59d13133a3fd11b1ad538;p=IRC.git if an operation on canonical objects wants to use other canonical ops, it must supply canonical arguments. that said, if the operation is straightforward and the result isn't hashed, its okay to build the object from scratch and then canonicalize it at the end --- diff --git a/Robust/src/Analysis/Disjoint/Canonical.java b/Robust/src/Analysis/Disjoint/Canonical.java index 317a9b4f..3ef81361 100644 --- a/Robust/src/Analysis/Disjoint/Canonical.java +++ b/Robust/src/Analysis/Disjoint/Canonical.java @@ -569,7 +569,7 @@ abstract public class Canonical { } // otherwise, no cached result... - ChangeSet out = new ChangeSet(); + ChangeSet out = ChangeSet.factory(); Iterator itrO = rsO.iterator(); while( itrO.hasNext() ) { @@ -615,14 +615,14 @@ abstract public class Canonical { out = Canonical.union( out, ChangeSet.factory( - ChangeTuple.factory( o, theUnion ) + ChangeTuple.factory( o, theUnion ) ) ); } } } - out = (ChangeSet) makeCanonical( out ); + assert out.isCanonical(); op2result.put( op, out ); return out; }