import Analysis.CallGraph.*;
import Analysis.Liveness;
+import Analysis.ArrayReferencees;
import IR.*;
import IR.Flat.*;
import IR.Tree.Modifiers;
// data from the compiler
- public State state;
- public CallGraph callGraph;
- public Liveness liveness;
- public TypeUtil typeUtil;
- public int allocationDepth;
+ public State state;
+ public CallGraph callGraph;
+ public Liveness liveness;
+ public ArrayReferencees arrayReferencees;
+ public TypeUtil typeUtil;
+ public int allocationDepth;
// for public interface methods to warn that they
// are grabbing results during analysis
TypeUtil tu,
CallGraph callGraph,
Liveness liveness,
+ ArrayReferencees ar,
int allocationDepth,
boolean writeDOTs,
boolean writeAllDOTs,
String aliasFile) throws java.io.IOException {
this.methodEffects = false;
- init(state,tu,callGraph,liveness,allocationDepth,writeDOTs,writeAllDOTs,aliasFile);
+ init(state,tu,callGraph,liveness,ar,allocationDepth,writeDOTs,writeAllDOTs,aliasFile);
}
TypeUtil tu,
CallGraph callGraph,
Liveness liveness,
+ ArrayReferencees ar,
int allocationDepth,
boolean writeDOTs,
boolean writeAllDOTs,
boolean methodEffects) throws java.io.IOException {
this.methodEffects = methodEffects;
- init(state,tu,callGraph,liveness,allocationDepth,writeDOTs,writeAllDOTs,aliasFile);
+ init(state,tu,callGraph,liveness,ar,allocationDepth,writeDOTs,writeAllDOTs,aliasFile);
}
TypeUtil tu,
CallGraph callGraph,
Liveness liveness,
+ ArrayReferencees ar,
int allocationDepth,
boolean writeDOTs,
boolean writeAllDOTs,
this.methodEffects = methodEffects;
this.mapMethodContextToLiveInAllocationSiteSet=mapMethodContextToLiveInAllocationSiteSet;
- init(state, tu, callGraph, liveness, allocationDepth, writeDOTs, writeAllDOTs,
+ init(state, tu, callGraph, liveness, ar, allocationDepth, writeDOTs, writeAllDOTs,
aliasFile);
}
TypeUtil tu,
CallGraph callGraph,
Liveness liveness,
+ ArrayReferencees ar,
int allocationDepth,
boolean writeDOTs,
boolean writeAllDOTs,
analysisComplete = false;
- this.state = state;
- this.typeUtil = tu;
- this.callGraph = callGraph;
- this.liveness = liveness;
- this.allocationDepth = allocationDepth;
- this.writeDOTs = writeDOTs;
- this.writeAllDOTs = writeAllDOTs;
+ this.state = state;
+ this.typeUtil = tu;
+ this.callGraph = callGraph;
+ this.liveness = liveness;
+ this.arrayReferencees = ar;
+ this.allocationDepth = allocationDepth;
+ this.writeDOTs = writeDOTs;
+ this.writeAllDOTs = writeAllDOTs;
// set some static configuration for OwnershipGraphs
OwnershipGraph.allocationDepth = allocationDepth;
case FKind.FlatSetElementNode:
FlatSetElementNode fsen = (FlatSetElementNode) fn;
+
+ if( arrayReferencees.doesNotCreateNewReaching( fsen ) ) {
+ System.out.println( "Skipping no-heap-effect: "+fsen );
+ }
+
lhs = fsen.getDst();
rhs = fsen.getSrc();
if( !rhs.getType().isImmutable() || rhs.getType().isArray() ) {