envgen.analysis.stat
Class SideEffectsAnalysis

java.lang.Object
  |
  +--soot.toolkits.scalar.AbstractFlowAnalysis
        |
        +--soot.toolkits.scalar.FlowAnalysis
              |
              +--envgen.analysis.stat.ForwardFlowAnalysis
                    |
                    +--envgen.analysis.stat.SideEffectsAnalysis

class SideEffectsAnalysis
extends ForwardFlowAnalysis

Implementation of interprocedural, flow-sensitive, parameterized side-effects analysis.


Field Summary
(package private)  PointsToAnalysis alias
          Alias analysis results that are used by the side-effects analysis to resolve aliases.
(package private)  SideEffectsAnalysisMain analysis
          Analysis field,whose method analyzeSideEffects() gets recursively called for each of the targets at a call site.
(package private)  AnalysisResults analysisResults
           
(package private)  EnvCallGraph callGraph
          Call graph that gets traversed in the top down order.
(package private)  int debug
           
(package private)  soot.toolkits.scalar.FlowSet initSet
          Initial data flow set, empty for this analysis.
(package private)  soot.SootMethod method
           
(package private)  boolean mustSE
           
(package private)  java.util.HashSet visited
          Set that keeps track of visited methods, used to detect cycles in the call graph.
 
Fields inherited from class soot.toolkits.scalar.FlowAnalysis
unitToAfterFlow
 
Fields inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
graph, unitToBeforeFlow
 
Constructor Summary
(package private) SideEffectsAnalysis(soot.toolkits.graph.UnitGraph g, soot.SootMethod method, soot.toolkits.scalar.FlowSet initSet, EnvCallGraph callGraph, AnalysisResults analysisResults, java.util.HashSet visited, SideEffectsAnalysisMain analysis, PointsToAnalysis aliases, boolean mustSE)
           
 
Method Summary
protected  void copy(java.lang.Object source, java.lang.Object dest)
           
protected  java.lang.Object entryInitialFlow()
           
protected  void flowThrough(java.lang.Object inValue, java.lang.Object unit, java.lang.Object outValue)
          Implementation of transfer functions.
 SymLoc getExtendedLoc(SymLocPath symLoc, Accessor accessor)
          Appends a modified accessor to temp.
protected  MultiSet getExtendedLocs(soot.Value base, soot.Type baseType, soot.Type modType, Accessor accessor, DataFlowSet aliasSet)
          Extends locations pointed to by base with accessor.
 MultiSet getLocsOfArrayRef(soot.Value lhs, DataFlowSet aliasSet)
           
 MultiSet getLocsOfInstanceFieldRef(soot.Value lhs, DataFlowSet aliasSet)
           
 MultiSet getLocsOfStaticFieldRef(soot.Value lhs, DataFlowSet aliasSet)
           
protected  MultiSet getMappedSummaryOfCalledMethod(soot.jimple.Stmt unit, DataFlowSet summary)
          For each entry loc->{values} in the summary, builds a mapping mappedLoc -> {mapped values}, packs them into one set and returns.
protected  void merge(java.lang.Object in1, java.lang.Object in2, java.lang.Object out)
          Merge operator.
protected  java.lang.Object newInitialFlow()
          Initially data flow set is empty.
 void processAssignStmt(soot.jimple.Stmt unit, soot.toolkits.scalar.FlowSet genSet, soot.toolkits.scalar.FlowSet killSet, DataFlowSet in)
           
protected  void processCallSite(soot.jimple.Stmt unit, soot.toolkits.scalar.FlowSet genSet, soot.toolkits.scalar.FlowSet killSet, DataFlowSet in)
           
 
Methods inherited from class envgen.analysis.stat.ForwardFlowAnalysis
doAnalysis, isForward
 
Methods inherited from class soot.toolkits.scalar.FlowAnalysis
getFlowAfter
 
Methods inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
customizeInitialFlowGraph, getFlowBefore, treatTrapHandlersAsEntries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

initSet

soot.toolkits.scalar.FlowSet initSet
Initial data flow set, empty for this analysis.


alias

PointsToAnalysis alias
Alias analysis results that are used by the side-effects analysis to resolve aliases.


callGraph

EnvCallGraph callGraph
Call graph that gets traversed in the top down order.


analysisResults

AnalysisResults analysisResults

visited

java.util.HashSet visited
Set that keeps track of visited methods, used to detect cycles in the call graph. When a cycle is detected, it is broken and the most general information is assumed. For example, for side-effects analysis, the method is assumed to modifies all possible locations of our interest.


method

soot.SootMethod method

analysis

SideEffectsAnalysisMain analysis
Analysis field,whose method analyzeSideEffects() gets recursively called for each of the targets at a call site.


mustSE

boolean mustSE

debug

int debug
Constructor Detail

SideEffectsAnalysis

SideEffectsAnalysis(soot.toolkits.graph.UnitGraph g,
                    soot.SootMethod method,
                    soot.toolkits.scalar.FlowSet initSet,
                    EnvCallGraph callGraph,
                    AnalysisResults analysisResults,
                    java.util.HashSet visited,
                    SideEffectsAnalysisMain analysis,
                    PointsToAnalysis aliases,
                    boolean mustSE)
Method Detail

newInitialFlow

protected java.lang.Object newInitialFlow()
Initially data flow set is empty.

Specified by:
newInitialFlow in class soot.toolkits.scalar.AbstractFlowAnalysis

entryInitialFlow

protected java.lang.Object entryInitialFlow()
Specified by:
entryInitialFlow in class soot.toolkits.scalar.AbstractFlowAnalysis

flowThrough

protected void flowThrough(java.lang.Object inValue,
                           java.lang.Object unit,
                           java.lang.Object outValue)
Implementation of transfer functions.

Specified by:
flowThrough in class soot.toolkits.scalar.FlowAnalysis

merge

protected void merge(java.lang.Object in1,
                     java.lang.Object in2,
                     java.lang.Object out)
Merge operator.

Specified by:
merge in class soot.toolkits.scalar.AbstractFlowAnalysis

copy

protected void copy(java.lang.Object source,
                    java.lang.Object dest)
Specified by:
copy in class soot.toolkits.scalar.AbstractFlowAnalysis

processAssignStmt

public void processAssignStmt(soot.jimple.Stmt unit,
                              soot.toolkits.scalar.FlowSet genSet,
                              soot.toolkits.scalar.FlowSet killSet,
                              DataFlowSet in)

getLocsOfInstanceFieldRef

public MultiSet getLocsOfInstanceFieldRef(soot.Value lhs,
                                          DataFlowSet aliasSet)

getLocsOfArrayRef

public MultiSet getLocsOfArrayRef(soot.Value lhs,
                                  DataFlowSet aliasSet)

getLocsOfStaticFieldRef

public MultiSet getLocsOfStaticFieldRef(soot.Value lhs,
                                        DataFlowSet aliasSet)

processCallSite

protected void processCallSite(soot.jimple.Stmt unit,
                               soot.toolkits.scalar.FlowSet genSet,
                               soot.toolkits.scalar.FlowSet killSet,
                               DataFlowSet in)

getMappedSummaryOfCalledMethod

protected MultiSet getMappedSummaryOfCalledMethod(soot.jimple.Stmt unit,
                                                  DataFlowSet summary)
For each entry loc->{values} in the summary, builds a mapping mappedLoc -> {mapped values}, packs them into one set and returns.


getExtendedLocs

protected MultiSet getExtendedLocs(soot.Value base,
                                   soot.Type baseType,
                                   soot.Type modType,
                                   Accessor accessor,
                                   DataFlowSet aliasSet)
Extends locations pointed to by base with accessor.


getExtendedLoc

public SymLoc getExtendedLoc(SymLocPath symLoc,
                             Accessor accessor)
Appends a modified accessor to temp.