dk.brics.xact.analysis.soot
Class ArrayConstantAnalysis

java.lang.Object
  extended by soot.toolkits.scalar.AbstractFlowAnalysis<N,A>
      extended by soot.toolkits.scalar.FlowAnalysis<N,A>
          extended by soot.toolkits.scalar.ForwardFlowAnalysis<Unit,Map<Local,ArrayConstantInfo>>
              extended by dk.brics.xact.analysis.soot.ArrayConstantAnalysis

public class ArrayConstantAnalysis
extends ForwardFlowAnalysis<Unit,Map<Local,ArrayConstantInfo>>

Determines for each program point the arrays whose exact contents are known in terms of other local variables.

The analysis is specifically designed to handle the bytecode produced by inline array initializers (see example) and not much of anything else. Example of inline array initializer:

 XML[] array = new XML[] { xml1, xml2, xml3 }; // explicit
 XML y = XML.concat(xml1, xml2, xml3); // implicit
 


Field Summary
 
Fields inherited from class soot.toolkits.scalar.FlowAnalysis
filterUnitToAfterFlow, unitToAfterFlow
 
Fields inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
filterUnitToBeforeFlow, graph, unitToBeforeFlow
 
Constructor Summary
ArrayConstantAnalysis(DirectedGraph<Unit> graph)
           
 
Method Summary
protected  void copy(Map<Local,ArrayConstantInfo> src, Map<Local,ArrayConstantInfo> dest)
           
protected  Map<Local,ArrayConstantInfo> entryInitialFlow()
           
protected  void flowThrough(Map<Local,ArrayConstantInfo> src, Unit unit, Map<Local,ArrayConstantInfo> dest)
           
protected  void merge(Map<Local,ArrayConstantInfo> src1, Map<Local,ArrayConstantInfo> src2, Map<Local,ArrayConstantInfo> dest)
           
protected  Map<Local,ArrayConstantInfo> newInitialFlow()
           
 
Methods inherited from class soot.toolkits.scalar.ForwardFlowAnalysis
constructWorklist, doAnalysis, isForward
 
Methods inherited from class soot.toolkits.scalar.FlowAnalysis
constructOrderer, getFlowAfter
 
Methods inherited from class soot.toolkits.scalar.AbstractFlowAnalysis
getFlowBefore, merge, treatTrapHandlersAsEntries
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArrayConstantAnalysis

public ArrayConstantAnalysis(DirectedGraph<Unit> graph)
Method Detail

copy

protected void copy(Map<Local,ArrayConstantInfo> src,
                    Map<Local,ArrayConstantInfo> dest)
Specified by:
copy in class AbstractFlowAnalysis<Unit,Map<Local,ArrayConstantInfo>>

entryInitialFlow

protected Map<Local,ArrayConstantInfo> entryInitialFlow()
Specified by:
entryInitialFlow in class AbstractFlowAnalysis<Unit,Map<Local,ArrayConstantInfo>>

flowThrough

protected void flowThrough(Map<Local,ArrayConstantInfo> src,
                           Unit unit,
                           Map<Local,ArrayConstantInfo> dest)
Specified by:
flowThrough in class FlowAnalysis<Unit,Map<Local,ArrayConstantInfo>>

merge

protected void merge(Map<Local,ArrayConstantInfo> src1,
                     Map<Local,ArrayConstantInfo> src2,
                     Map<Local,ArrayConstantInfo> dest)
Specified by:
merge in class AbstractFlowAnalysis<Unit,Map<Local,ArrayConstantInfo>>

newInitialFlow

protected Map<Local,ArrayConstantInfo> newInitialFlow()
Specified by:
newInitialFlow in class AbstractFlowAnalysis<Unit,Map<Local,ArrayConstantInfo>>


Copyright © 2005-2011 Aarhus University.