envgen.analysis.stat
Class SideEffectsAnalysisMain

java.lang.Object
  |
  +--envgen.analysis.stat.StaticAnalysis
        |
        +--envgen.analysis.stat.SideEffectsAnalysisMain
All Implemented Interfaces:
IApproach

public class SideEffectsAnalysisMain
extends StaticAnalysis
implements IApproach

Invokes points-to analysis, walks over methdod and performs side-effects analysis for each unvisited method.


Field Summary
(package private)  AnalysisResults analysisResults
           
(package private)  int debug
          Set to print debugging messages.
(package private)  boolean mustSE
           
(package private)  boolean returnSensitivity
          Integer field that keeps track of value k in k-limiting.
(package private)  boolean unitAnalysis
           
 
Fields inherited from class envgen.analysis.stat.StaticAnalysis
callGraph, chainLength, dump, packageAnalysis, packageName, unitStaticFields, unitTable
 
Constructor Summary
SideEffectsAnalysisMain(java.util.HashMap unitTable, EnvCallGraph callGraph)
           
 
Method Summary
 Assumptions acquireAssumptions()
           
 void analyzeMustSideEffects(soot.SootMethod externalMethod, java.util.HashSet visited)
          Interprocedural flow-sensitive, parameterized must side-effects analysis.
 void analyzeSideEffects(soot.SootMethod externalMethod, java.util.HashSet visited)
          Interprocedural flow-sensitive, parameterized may side-effects analysis.
 void dumpPTResults()
           
 void dumpSEResults()
           
 DataFlowSet getAllModifiedTable(soot.SootMethod sm)
          Builds a table assuming that sm can modifiy anything.
 MultiSet getReturnSummary(soot.toolkits.graph.CompleteUnitGraph cfg, SideEffectsAnalysis modifications)
          Calculates sode-effects summary by combining all of the side-effects at exit points of the method.
 DataFlowSet getSummary(soot.toolkits.graph.CompleteUnitGraph cfg, SideEffectsAnalysis modifications, boolean must)
          Calculates sode-effects summary by combining all of the side-effects at exit points of the method.
 void performSEAnalysis(java.util.List markedMethods)
          For each of the methods in the environment records a set of unit data side-effects.
 
Methods inherited from class envgen.analysis.stat.StaticAnalysis
addField, getCallGraph, getClass, getExtendedLoc, getExtendedLoc, getMappedArg, getMappedLocation, getMappedLocs, getMappedLocs, getMappedPathParam, getMappedPathParam, getMappedPathParam, getMappedReturnLocs, getMappedTopParam, getMappedVals, getStaticFields, getValues, isSingularLoc, isSubType, isUnitSuperType, processRefOrScalarType, processRefType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

analysisResults

AnalysisResults analysisResults

returnSensitivity

boolean returnSensitivity
Integer field that keeps track of value k in k-limiting. The value can be varied by the user. The larger the value, the more precise information will be produced by the analysis.


mustSE

boolean mustSE

unitAnalysis

boolean unitAnalysis

debug

int debug
Set to print debugging messages.

Constructor Detail

SideEffectsAnalysisMain

public SideEffectsAnalysisMain(java.util.HashMap unitTable,
                               EnvCallGraph callGraph)
Method Detail

acquireAssumptions

public Assumptions acquireAssumptions()
Specified by:
acquireAssumptions in interface IApproach

performSEAnalysis

public void performSEAnalysis(java.util.List markedMethods)
For each of the methods in the environment records a set of unit data side-effects.


analyzeSideEffects

public void analyzeSideEffects(soot.SootMethod externalMethod,
                               java.util.HashSet visited)
Interprocedural flow-sensitive, parameterized may side-effects analysis.


analyzeMustSideEffects

public void analyzeMustSideEffects(soot.SootMethod externalMethod,
                                   java.util.HashSet visited)
Interprocedural flow-sensitive, parameterized must side-effects analysis.


getAllModifiedTable

public DataFlowSet getAllModifiedTable(soot.SootMethod sm)
Builds a table assuming that sm can modifiy anything. Used to resolve cycles and recursion in side-effects analysis.


getSummary

public DataFlowSet getSummary(soot.toolkits.graph.CompleteUnitGraph cfg,
                              SideEffectsAnalysis modifications,
                              boolean must)
Calculates sode-effects summary by combining all of the side-effects at exit points of the method.


getReturnSummary

public MultiSet getReturnSummary(soot.toolkits.graph.CompleteUnitGraph cfg,
                                 SideEffectsAnalysis modifications)
Calculates sode-effects summary by combining all of the side-effects at exit points of the method.


dumpSEResults

public void dumpSEResults()

dumpPTResults

public void dumpPTResults()