soot.jimple.toolkits.annotation.purity
Class PurityInterproceduralAnalysis

java.lang.Object
  extended by soot.jimple.toolkits.annotation.purity.AbstractInterproceduralAnalysis
      extended by soot.jimple.toolkits.annotation.purity.PurityInterproceduralAnalysis

public class PurityInterproceduralAnalysis
extends AbstractInterproceduralAnalysis


Field Summary
 
Fields inherited from class soot.jimple.toolkits.annotation.purity.AbstractInterproceduralAnalysis
cg, data, dg, doCheck, order, unanalysed
 
Method Summary
protected  void analyseMethod(SootMethod method, Object dst)
          Compute the summary for a method by analysing its body.
protected  void applySummary(Object src, Stmt stmt, Object summary, Object dst)
          Interprocedural analysis will call applySummary repeatidly as a consequence to analyseCall.
protected  void copy(Object source, Object dest)
          Copy src into dst.
protected  void fillDotGraph(String prefix, Object o, DotGraph out)
          Called by drawAsOneDot to fill dot subgraph out with the contents of summary o.
protected  void merge(Object in1, Object in2, Object out)
          Merge in1 and in2 into out.
protected  Object newInitialSummary()
          Initial summary value for analysed funtions.
protected  Object summaryOfUnanalysedMethod(SootMethod method)
          Whenever the analyse requires the summary of a method you filtered-out, this function is called instead of analyseMethod.
 
Methods inherited from class soot.jimple.toolkits.annotation.purity.AbstractInterproceduralAnalysis
analyseCall, doAnalysis, drawAsManyDot, drawAsOneDot, getAnalysedMethods, getSummaryFor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newInitialSummary

protected Object newInitialSummary()
Description copied from class: AbstractInterproceduralAnalysis
Initial summary value for analysed funtions.

Specified by:
newInitialSummary in class AbstractInterproceduralAnalysis

merge

protected void merge(Object in1,
                     Object in2,
                     Object out)
Description copied from class: AbstractInterproceduralAnalysis
Merge in1 and in2 into out.

Note: in1 or in2 can be aliased to out (e.g., analyseCall).

Specified by:
merge in class AbstractInterproceduralAnalysis

copy

protected void copy(Object source,
                    Object dest)
Description copied from class: AbstractInterproceduralAnalysis
Copy src into dst.

Specified by:
copy in class AbstractInterproceduralAnalysis

analyseMethod

protected void analyseMethod(SootMethod method,
                             Object dst)
Description copied from class: AbstractInterproceduralAnalysis
Compute the summary for a method by analysing its body. Will be called only on methods not filtered-out.

Specified by:
analyseMethod in class AbstractInterproceduralAnalysis
Parameters:
method - is the method to be analysed
dst - is where to put the computed method summary

summaryOfUnanalysedMethod

protected Object summaryOfUnanalysedMethod(SootMethod method)
Description copied from class: AbstractInterproceduralAnalysis
Whenever the analyse requires the summary of a method you filtered-out, this function is called instead of analyseMethod.

Note: This function is called at most once per filtered-out method. It is the equivalent of entryInitialFlow!

Specified by:
summaryOfUnanalysedMethod in class AbstractInterproceduralAnalysis
See Also:
PurityGraph.conservativeGraph, PurityGraph.freshGraph

applySummary

protected void applySummary(Object src,
                            Stmt stmt,
                            Object summary,
                            Object dst)
Description copied from class: AbstractInterproceduralAnalysis
Interprocedural analysis will call applySummary repeatidly as a consequence to analyseCall. Once for each possible target method of the callStmt statement, provided with its summary.

Specified by:
applySummary in class AbstractInterproceduralAnalysis
Parameters:
stmt - any statement containing an InvokeExpr
src - summary valid before the call statement
summary - summary of the possible target of callStmt considered here
dst - where to put the result
See Also:
PurityGraph.methodCall

fillDotGraph

protected void fillDotGraph(String prefix,
                            Object o,
                            DotGraph out)
Description copied from class: AbstractInterproceduralAnalysis
Called by drawAsOneDot to fill dot subgraph out with the contents of summary o.

Overrides:
fillDotGraph in class AbstractInterproceduralAnalysis
Parameters:
prefix - gives you a unique string to prefix your node names and avoid name-clash