From: jjenista Date: Wed, 9 Dec 2009 01:16:24 +0000 (+0000) Subject: changes X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e98275129ed410b9655fd32432638c0cd79f8992;p=IRC.git changes --- diff --git a/Robust/src/Analysis/Disjoint/AllocSite.java b/Robust/src/Analysis/Disjoint/AllocSite.java index 22bcb8bb..70bf0794 100644 --- a/Robust/src/Analysis/Disjoint/AllocSite.java +++ b/Robust/src/Analysis/Disjoint/AllocSite.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*; diff --git a/Robust/src/Analysis/Disjoint/Canonical.java b/Robust/src/Analysis/Disjoint/Canonical.java index 981bb657..8e15a526 100644 --- a/Robust/src/Analysis/Disjoint/Canonical.java +++ b/Robust/src/Analysis/Disjoint/Canonical.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*; diff --git a/Robust/src/Analysis/Disjoint/CanonicalWrapper.java b/Robust/src/Analysis/Disjoint/CanonicalWrapper.java index 4f8f4075..9082c003 100644 --- a/Robust/src/Analysis/Disjoint/CanonicalWrapper.java +++ b/Robust/src/Analysis/Disjoint/CanonicalWrapper.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; public class CanonicalWrapper { Canonical a; diff --git a/Robust/src/Analysis/Disjoint/ChangeSet.java b/Robust/src/Analysis/Disjoint/ChangeSet.java index 4f343a0e..cc110894 100644 --- a/Robust/src/Analysis/Disjoint/ChangeSet.java +++ b/Robust/src/Analysis/Disjoint/ChangeSet.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*; diff --git a/Robust/src/Analysis/Disjoint/ChangeTuple.java b/Robust/src/Analysis/Disjoint/ChangeTuple.java index b4ddfd37..8a91b609 100644 --- a/Robust/src/Analysis/Disjoint/ChangeTuple.java +++ b/Robust/src/Analysis/Disjoint/ChangeTuple.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*; diff --git a/Robust/src/Analysis/Disjoint/DisjointAnalysis.java b/Robust/src/Analysis/Disjoint/DisjointAnalysis.java index 5e0345d4..c6359a80 100644 --- a/Robust/src/Analysis/Disjoint/DisjointAnalysis.java +++ b/Robust/src/Analysis/Disjoint/DisjointAnalysis.java @@ -212,6 +212,7 @@ public class DisjointAnalysis { ReachGraph rg = analyzeMethod( d ); ReachGraph rgPrev = getPartial( d ); + if( !rg.equals( rgPrev ) ) { setPartial( d, rg ); @@ -283,7 +284,7 @@ public class DisjointAnalysis { flatm, fn, returnNodesToCombineForCompleteReachabilityGraph, - og); + og); */ /* diff --git a/Robust/src/Analysis/Disjoint/HeapRegionNode.java b/Robust/src/Analysis/Disjoint/HeapRegionNode.java index dbbaf1aa..ac729a20 100644 --- a/Robust/src/Analysis/Disjoint/HeapRegionNode.java +++ b/Robust/src/Analysis/Disjoint/HeapRegionNode.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*; diff --git a/Robust/src/Analysis/Disjoint/ReachGraph.java b/Robust/src/Analysis/Disjoint/ReachGraph.java index 20783995..77b39f9c 100644 --- a/Robust/src/Analysis/Disjoint/ReachGraph.java +++ b/Robust/src/Analysis/Disjoint/ReachGraph.java @@ -10,9 +10,8 @@ public class ReachGraph { protected static final TempDescriptor tdReturn = new TempDescriptor( "_Return___" ); - /* // some frequently used reachability constants - protected static final ReachState rstateEmpty = new ReachTupleSet().makeCanonical(); + protected static final ReachState rstateEmpty = new ReachState().makeCanonical(); protected static final ReachSet rsetEmpty = new ReachSet().makeCanonical(); protected static final ReachSet rsetWithEmptyState = new ReachSet( rstateEmpty ).makeCanonical(); @@ -20,7 +19,7 @@ public class ReachGraph { public Hashtable td2vn; public HashSet allocSites; - */ + // use to disable improvements for comparison protected static final boolean DISABLE_STRONG_UPDATES = false; @@ -729,11 +728,11 @@ public class ReachGraph { // use a beta that has everything and put it all over the // parameter model, then use a global sweep later to fix // it up, since parameters can have different shapes - ReachState tts0 = new ReachTupleSet( ttPrimary ).makeCanonical(); + ReachState tts0 = new ReachState( ttPrimary ).makeCanonical(); ReachSet betaSoup; if( createSecondaryRegion ) { - ReachState tts1 = new ReachTupleSet( ttSecondary ).makeCanonical(); - ReachState tts2 = new ReachTupleSet( ttPrimary ).makeCanonical().union( ttSecondary ); + ReachState tts1 = new ReachState( ttSecondary ).makeCanonical(); + ReachState tts2 = new ReachState( ttPrimary ).makeCanonical().union( ttSecondary ); betaSoup = ReachSet.factory( tts0 ).union( tts1 ).union( tts2 ); } else { betaSoup = ReachSet.factory( tts0 ); @@ -929,9 +928,9 @@ public class ReachGraph { ReachTuple.ARITY_ONE ).makeCanonical(); - ReachState tts0 = new ReachTupleSet( ttPrimary ).makeCanonical(); - ReachState tts1 = new ReachTupleSet( ttAliased ).makeCanonical(); - ReachState tts2 = new ReachTupleSet( ttPrimary ).makeCanonical().union( ttAliased ); + ReachState tts0 = new ReachState( ttPrimary ).makeCanonical(); + ReachState tts1 = new ReachState( ttAliased ).makeCanonical(); + ReachState tts2 = new ReachState( ttPrimary ).makeCanonical().union( ttAliased ); ReachSet betaSoup = ReachSet.factory( tts0 ).union( tts1 ).union( tts2 ); @@ -1009,9 +1008,9 @@ public class ReachGraph { false, // multi-object ReachTuple.ARITY_ONE ).makeCanonical(); - ReachState ttsI = new ReachTupleSet( ttPrimaryI ).makeCanonical(); - ReachState ttsA = new ReachTupleSet( ttAliased ).makeCanonical(); - ReachState ttsIA = new ReachTupleSet( ttPrimaryI ).makeCanonical().union( ttAliased ); + ReachState ttsI = new ReachState( ttPrimaryI ).makeCanonical(); + ReachState ttsA = new ReachState( ttAliased ).makeCanonical(); + ReachState ttsIA = new ReachState( ttPrimaryI ).makeCanonical().union( ttAliased ); ReachSet betaSoup = ReachSet.factory( ttsI ).union( ttsA ).union( ttsIA ); @@ -1128,7 +1127,7 @@ public class ReachGraph { false, // multi-object ReachTuple.ARITY_ONE ).makeCanonical(); - ReachState ttsJ = new ReachTupleSet( ttPrimaryJ ).makeCanonical(); + ReachState ttsJ = new ReachState( ttPrimaryJ ).makeCanonical(); ReachState ttsIJ = ttsI.union( ttsJ ); ReachState ttsAJ = ttsA.union( ttsJ ); ReachState ttsIAJ = ttsIA.union( ttsJ ); @@ -3273,13 +3272,13 @@ public class ReachGraph { ReachSet callerReachabilityNew = new ReachSet().makeCanonical(); // for initializing structures in this method - ReachState ttsEmpty = new ReachTupleSet().makeCanonical(); + ReachState ttsEmpty = new ReachState().makeCanonical(); // use this to construct a change set if required; the idea is to // map every partially rewritten token tuple set to the set of // caller-context token tuple sets that were used to generate it - Hashtable > rewritten2source = - new Hashtable >(); + Hashtable > rewritten2source = + new Hashtable >(); rewritten2source.put( ttsEmpty, new HashSet() ); @@ -3332,7 +3331,7 @@ public class ReachGraph { } else { // otherwise there's no need for a rewrite, just pass this one on - ReachState ttsCaller = new ReachTupleSet( ttCallee ).makeCanonical(); + ReachState ttsCaller = new ReachState( ttCallee ).makeCanonical(); ttCalleeRewrites = new ReachSet( ttsCaller ).makeCanonical(); } @@ -3604,7 +3603,7 @@ public class ReachGraph { while( stateItr.hasNext() ) { ReachState ttsOld = stateItr.next(); - ReachState markedTokens = new ReachTupleSet().makeCanonical(); + ReachState markedTokens = new ReachState().makeCanonical(); Iterator ttItr = ttsOld.iterator(); while( ttItr.hasNext() ) { @@ -3648,7 +3647,7 @@ public class ReachGraph { // remove all marked tokens and establish a change set that should // propagate backwards over edges from this node - ReachState ttsPruned = new ReachTupleSet().makeCanonical(); + ReachState ttsPruned = new ReachState().makeCanonical(); ttItr = ttsOld.iterator(); while( ttItr.hasNext() ) { ReachTuple ttOld = ttItr.next(); diff --git a/Robust/src/Analysis/Disjoint/ReachOperation.java b/Robust/src/Analysis/Disjoint/ReachOperation.java new file mode 100644 index 00000000..e2d46fb4 --- /dev/null +++ b/Robust/src/Analysis/Disjoint/ReachOperation.java @@ -0,0 +1,23 @@ +package Analysis.Disjoint; + +public class ReachOperation { + Canonical a; + Canonical b; + public Canonical c; + + public ReachOperation(Canonical a, Canonical b) { + assert a.canonicalvalue!=0; + assert b.canonicalvalue!=0; + this.a=a; + this.b=b; + } + + public int hashCode() { + return a.canonicalvalue^(b.canonicalvalue<<1); + } + public boolean equals(Object o) { + ReachOperation ro=(ReachOperation)o; + return ro.a.canonicalvalue==a.canonicalvalue&& + ro.b.canonicalvalue==b.canonicalvalue; + } +} \ No newline at end of file diff --git a/Robust/src/Analysis/Disjoint/ReachSet.java b/Robust/src/Analysis/Disjoint/ReachSet.java index ae80aafa..7cfced63 100644 --- a/Robust/src/Analysis/Disjoint/ReachSet.java +++ b/Robust/src/Analysis/Disjoint/ReachSet.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*; @@ -69,7 +69,7 @@ public class ReachSet extends Canonical { Iterator itr = iterator(); while( itr.hasNext() ) { - ReachState ttsThis = (ReachTupleSet) itr.next(); + ReachState ttsThis = (ReachState) itr.next(); if( ttsThis.containsWithZeroes(tts) ) { return true; } @@ -96,7 +96,7 @@ public class ReachSet extends Canonical { Iterator itr = iterator(); while( itr.hasNext() ) { - ReachState ttsThis = (ReachTupleSet) itr.next(); + ReachState ttsThis = (ReachState) itr.next(); if( strict ) { if( !tts.equals(ttsThis) && tts.isSubset(ttsThis) ) { return true; @@ -115,7 +115,7 @@ public class ReachSet extends Canonical { public boolean containsTuple(ReachTuple tt) { Iterator itr = iterator(); while( itr.hasNext() ) { - ReachState tts = (ReachTupleSet) itr.next(); + ReachState tts = (ReachState) itr.next(); if( tts.containsTuple(tt) ) { return true; } @@ -126,7 +126,7 @@ public class ReachSet extends Canonical { public boolean containsTupleSetWithBoth(ReachTuple tt1, ReachTuple tt2) { Iterator itr = iterator(); while( itr.hasNext() ) { - ReachState tts = (ReachTupleSet) itr.next(); + ReachState tts = (ReachState) itr.next(); if( tts.containsTuple(tt1) && tts.containsTuple(tt2) ) { return true; } @@ -190,7 +190,7 @@ public class ReachSet extends Canonical { ReachSet rsOut = new ReachSet(); Iterator i = this.iterator(); while( i.hasNext() ) { - ReachState tts = (ReachTupleSet) i.next(); + ReachState tts = (ReachState) i.next(); if( rsIn.possibleReachabilities.contains(tts) ) { rsOut.possibleReachabilities.add(tts); } @@ -223,7 +223,7 @@ public class ReachSet extends Canonical { Iterator i = this.iterator(); while( i.hasNext() ) { - ReachState tts = (ReachTupleSet) i.next(); + ReachState tts = (ReachState) i.next(); if( tts.containsTuple( ttB ) ) { rsOut.possibleReachabilities.add( tts.remove(ttA) ); } else { @@ -242,7 +242,7 @@ public class ReachSet extends Canonical { Iterator i = this.iterator(); while( i.hasNext() ) { - ReachState tts = (ReachTupleSet) i.next(); + ReachState tts = (ReachState) i.next(); boolean changeFound = false; @@ -272,13 +272,13 @@ public class ReachSet extends Canonical { Iterator itrO = this.iterator(); while( itrO.hasNext() ) { - ReachState o = (ReachTupleSet) itrO.next(); + ReachState o = (ReachState) itrO.next(); Iterator itrR = rsIn.iterator(); while( itrR.hasNext() ) { - ReachState r = (ReachTupleSet) itrR.next(); + ReachState r = (ReachState) itrR.next(); - ReachState theUnion = new ReachTupleSet().makeCanonical(); + ReachState theUnion = new ReachState().makeCanonical(); Iterator itrRelement = r.iterator(); while( itrRelement.hasNext() ) { @@ -319,7 +319,7 @@ public class ReachSet extends Canonical { Iterator itrS = this.iterator(); while( itrS.hasNext() ) { - ReachState tts = (ReachTupleSet) itrS.next(); + ReachState tts = (ReachState) itrS.next(); rsOut.possibleReachabilities.add(tts.ageTokens(as) ); } @@ -334,7 +334,7 @@ public class ReachSet extends Canonical { Iterator itrS = this.iterator(); while( itrS.hasNext() ) { - ReachState tts = (ReachTupleSet) itrS.next(); + ReachState tts = (ReachState) itrS.next(); rsOut.possibleReachabilities.add(tts.unshadowTokens(as) ); } @@ -349,7 +349,7 @@ public class ReachSet extends Canonical { Iterator itrS = this.iterator(); while( itrS.hasNext() ) { - ReachState tts = (ReachTupleSet) itrS.next(); + ReachState tts = (ReachState) itrS.next(); rsOut.possibleReachabilities.add(tts.toShadowTokens(as) ); } @@ -364,13 +364,13 @@ public class ReachSet extends Canonical { Iterator itrB = this.iterator(); while( itrB.hasNext() ) { - ReachState ttsB = (ReachTupleSet) itrB.next(); + ReachState ttsB = (ReachState) itrB.next(); boolean subsetExists = false; Iterator itrA = rsIn.iterator(); while( itrA.hasNext() && !subsetExists ) { - ReachState ttsA = (ReachTupleSet) itrA.next(); + ReachState ttsA = (ReachState) itrA.next(); if( ttsA.isSubset(ttsB) ) { subsetExists = true; @@ -394,7 +394,7 @@ public class ReachSet extends Canonical { if( numDimensions > 3 ) { // for problems that are too big, punt and use less // precise arity for reachability information - ReachState ttsImprecise = new ReachTupleSet().makeCanonical(); + ReachState ttsImprecise = new ReachState().makeCanonical(); Iterator itrThis = this.iterator(); while( itrThis.hasNext() ) { @@ -422,7 +422,7 @@ public class ReachSet extends Canonical { while( digits[numDimensions] == minArity ) { // spit out a "coordinate" made from these digits - ReachState ttsCoordinate = new ReachTupleSet().makeCanonical(); + ReachState ttsCoordinate = new ReachState().makeCanonical(); Iterator ttsItr = this.iterator(); for( int i = 0; i < numDimensions; ++i ) { assert ttsItr.hasNext(); diff --git a/Robust/src/Analysis/Disjoint/ReachState.java b/Robust/src/Analysis/Disjoint/ReachState.java index a4353072..587917f7 100644 --- a/Robust/src/Analysis/Disjoint/ReachState.java +++ b/Robust/src/Analysis/Disjoint/ReachState.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*; @@ -21,7 +21,7 @@ public class ReachState extends Canonical { tokenTuples.add(tt); } - public ReachState(ReachTupleSet tts) { + public ReachState(ReachState tts) { assert tts != null; // okay to clone, ReachTuple and ReachState should be canonical tokenTuples = (HashSet)tts.tokenTuples.clone(); @@ -92,7 +92,7 @@ public class ReachState extends Canonical { if (unionhash.containsKey(ro)) return (ReachState) unionhash.get(ro).c; else { - ReachState ttsOut = new ReachTupleSet(this); + ReachState ttsOut = new ReachState(this); ttsOut.tokenTuples.add(ttIn); ro.c=ttsOut=ttsOut.makeCanonical(); unionhash.put(ro,ro); @@ -100,13 +100,13 @@ public class ReachState extends Canonical { } } - public ReachState union(ReachTupleSet ttsIn) { + public ReachState union(ReachState ttsIn) { assert ttsIn != null; ReachOperation ro=new ReachOperation(this, ttsIn); if (unionhash.containsKey(ro)) { return (ReachState) unionhash.get(ro).c; } else { - ReachState ttsOut = new ReachTupleSet(this); + ReachState ttsOut = new ReachState(this); ttsOut.tokenTuples.addAll(ttsIn.tokenTuples); ro.c=ttsOut=ttsOut.makeCanonical(); unionhash.put(ro,ro); @@ -115,9 +115,9 @@ public class ReachState extends Canonical { } - public ReachState unionUpArity(ReachTupleSet ttsIn) { + public ReachState unionUpArity(ReachState ttsIn) { assert ttsIn != null; - ReachState ttsOut = new ReachTupleSet(); + ReachState ttsOut = new ReachState(); Iterator ttItr = this.iterator(); while( ttItr.hasNext() ) { @@ -153,7 +153,7 @@ public class ReachState extends Canonical { public ReachState remove(ReachTuple tt) { assert tt != null; - ReachState ttsOut = new ReachTupleSet(this); + ReachState ttsOut = new ReachState(this); ttsOut.tokenTuples.remove(tt); return ttsOut.makeCanonical(); } @@ -168,7 +168,7 @@ public class ReachState extends Canonical { return false; } - ReachState tts = (ReachTupleSet) o; + ReachState tts = (ReachState) o; return tokenTuples.equals(tts.tokenTuples); } @@ -205,7 +205,7 @@ public class ReachState extends Canonical { public ReachState ageTokens(AllocSite as) { assert as != null; - ReachState ttsOut = new ReachTupleSet(); + ReachState ttsOut = new ReachState(); ReachTuple ttSummary = null; ReachTuple ttOldest = null; @@ -280,7 +280,7 @@ public class ReachState extends Canonical { public ReachState unshadowTokens(AllocSite as) { assert as != null; - ReachState ttsOut = new ReachTupleSet(); + ReachState ttsOut = new ReachState(); ReachTuple ttSummary = null; ReachTuple ttShadowSummary = null; @@ -348,7 +348,7 @@ public class ReachState extends Canonical { public ReachState toShadowTokens(AllocSite as) { assert as != null; - ReachState ttsOut = new ReachTupleSet().makeCanonical(); + ReachState ttsOut = new ReachState().makeCanonical(); Iterator itrT = this.iterator(); while( itrT.hasNext() ) { @@ -385,7 +385,7 @@ public class ReachState extends Canonical { public ReachSet rewriteToken(ReachTuple tokenToRewrite, ReachSet replacements, boolean makeChangeSet, - Hashtable > forChangeSet) { + Hashtable > forChangeSet) { ReachSet rsOut = new ReachSet().makeCanonical(); @@ -393,13 +393,13 @@ public class ReachState extends Canonical { rsOut = rsOut.add(this); } else { - ReachState ttsMinusToken = new ReachTupleSet(this); + ReachState ttsMinusToken = new ReachState(this); ttsMinusToken.tokenTuples.remove(tokenToRewrite); Iterator replaceItr = replacements.iterator(); while( replaceItr.hasNext() ) { ReachState replacement = replaceItr.next(); - ReachState replaced = new ReachTupleSet(ttsMinusToken).makeCanonical(); + ReachState replaced = new ReachState(ttsMinusToken).makeCanonical(); replaced = replaced.unionUpArity(replacement); rsOut = rsOut.add(replaced); @@ -420,7 +420,7 @@ public class ReachState extends Canonical { public ReachState makeArityZeroOrMore() { - ReachState ttsOut = new ReachTupleSet().makeCanonical(); + ReachState ttsOut = new ReachState().makeCanonical(); Iterator itrThis = this.iterator(); while( itrThis.hasNext() ) { diff --git a/Robust/src/Analysis/Disjoint/ReachTuple.java b/Robust/src/Analysis/Disjoint/ReachTuple.java index bcca2918..9d9962d7 100644 --- a/Robust/src/Analysis/Disjoint/ReachTuple.java +++ b/Robust/src/Analysis/Disjoint/ReachTuple.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*; diff --git a/Robust/src/Analysis/Disjoint/RefEdge.java b/Robust/src/Analysis/Disjoint/RefEdge.java index 9f061912..9134f33b 100644 --- a/Robust/src/Analysis/Disjoint/RefEdge.java +++ b/Robust/src/Analysis/Disjoint/RefEdge.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*; @@ -18,16 +18,16 @@ public class RefEdge { protected ReachSet beta; protected ReachSet betaNew; - protected ReferenceSourceNode src; - protected HeapRegionNode dst; + protected RefSrcNode src; + protected HeapRegionNode dst; - - public RefEdge( ReferenceSourceNode src, - HeapRegionNode dst, - TypeDescriptor type, - String field, - boolean isInitialParam, - ReachSet beta ) { + + public RefEdge( RefSrcNode src, + HeapRegionNode dst, + TypeDescriptor type, + String field, + boolean isInitialParam, + ReachSet beta ) { assert type != null; this.src = src; @@ -50,11 +50,11 @@ public class RefEdge { public RefEdge copy() { RefEdge copy = new RefEdge( src, - dst, - type, - field, - isInitialParam, - beta ); + dst, + type, + field, + isInitialParam, + beta ); return copy; } @@ -110,11 +110,11 @@ public class RefEdge { } - public ReferenceSourceNode getSrc() { + public RefSrcNode getSrc() { return src; } - public void setSrc( ReferenceSourceNode rsn ) { + public void setSrc( RefSrcNode rsn ) { assert rsn != null; src = rsn; } @@ -202,73 +202,32 @@ public class RefEdge { } - public String toGraphEdgeString( boolean hideSubsetReachability, - boolean hideEdgeTaints ) { + public String toGraphEdgeString( boolean hideSubsetReachability ) { String edgeLabel = ""; - if (type != null) { + if( type != null ) { edgeLabel += type.toPrettyString() + "\\n"; } - if (field != null) { + if( field != null ) { edgeLabel += field + "\\n"; } - if (isInitialParam) { + if( isInitialParam ) { edgeLabel += "*init*\\n"; } - if( !hideEdgeTaints ) { - edgeLabel += "*taint*=" + Integer.toBinaryString(taintIdentifier) - + "\\n*SESE*=" + Integer.toBinaryString(SESEtaintIdentifier) - + "\\n"; - } - - edgeLabel += beta.toStringEscapeNewline(hideSubsetReachability); + edgeLabel += beta.toStringEscapeNewline( hideSubsetReachability ); return edgeLabel; } public String toString() { - if( type != null ) { - return new String("("+src+"->"+type.toPrettyString()+" "+field+"->"+dst+")"); - } - - return new String("("+src+"->"+type+" "+field+"->"+dst+")"); - } - - public void tainedBy(Integer paramIdx){ - int newTaint=(int) Math.pow(2, paramIdx.intValue()); - taintIdentifier=taintIdentifier | newTaint; - } - - public void setTaintIdentifier(int newTaint){ - taintIdentifier=newTaint; - } - - public void unionTaintIdentifier(int newTaint){ - taintIdentifier=taintIdentifier | newTaint; - } - - public void minusTaintIdentifier(int removedTaint){ - taintIdentifier = taintIdentifier & (~removedTaint); - } - - public int getTaintIdentifier(){ - return taintIdentifier; - } - - public int getSESETaintIdentifier(){ - return SESEtaintIdentifier; - } - - public void setSESETaintIdentifier(int newTaint){ - SESEtaintIdentifier=newTaint; - } - - public void unionSESETaintIdentifier(int newTaint){ - SESEtaintIdentifier=SESEtaintIdentifier | newTaint; - } - - + assert type != null; + return new String( "("+src+ + "->"+type.toPrettyString()+ + " "+field+ + "->"+dst+")" + ); + } } diff --git a/Robust/src/Analysis/Disjoint/RefSrcNode.java b/Robust/src/Analysis/Disjoint/RefSrcNode.java index c4e88bda..3db99187 100644 --- a/Robust/src/Analysis/Disjoint/RefSrcNode.java +++ b/Robust/src/Analysis/Disjoint/RefSrcNode.java @@ -1,14 +1,14 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*; import java.util.*; -public abstract class ReferenceSourceNode { +public abstract class RefSrcNode { protected HashSet referencees; - public ReferenceSourceNode() { + public RefSrcNode() { referencees = new HashSet(); } diff --git a/Robust/src/Analysis/Disjoint/VariableNode.java b/Robust/src/Analysis/Disjoint/VariableNode.java index 653908a4..7e58ea79 100644 --- a/Robust/src/Analysis/Disjoint/VariableNode.java +++ b/Robust/src/Analysis/Disjoint/VariableNode.java @@ -1,4 +1,4 @@ -package Analysis.DisjointAnalysis; +package Analysis.Disjoint; import IR.*; import IR.Flat.*;