soot.jimple.spark.geom.geomPA
Class OfflineProcessor

java.lang.Object
  extended by soot.jimple.spark.geom.geomPA.OfflineProcessor

public class OfflineProcessor
extends Object

This class contains the implementation of all kinds of preprocess algorithms preceding to the pointer analysis. Some implemented techniques are: 1. Intra-procedural equivalent pointer detection; 2. Unreachable library code removal; 3. Pointer numbering for worklist prioritizing.

Author:
richardxx

Constructor Summary
OfflineProcessor(int size, GeomPointsTo pta)
           
 
Method Summary
protected  void buildInstanceAssignmentGraph()
          Build the online assignment call graph with all the points-to facts.
protected  void buildSymbolicAssignmentGraph()
          We totally rebuild the graph.
protected  void cleanSparkResults()
          The pointers that we will refine in our context sensitive analysis do not need the spark results any more.
protected  void destroy()
           
protected  void eliminateUselessConstraints()
          Heavy-weight library is the major reason for the non-scalability of pointer analysis.
protected  void makeTopologicalOrder()
          Prepare for a near optimal worklist selection strategy inspired by Ben's PLDI 07 work.
protected  void mergeLocalVariables()
          As pointed out by the single entry graph contraction, temporary variables incur high redundancy in points-to relations.
 void recleanConstraints()
          After one iteration of analysis, the unreachable methods may introduce new useless constraints.
 void runOptimizations(Set<Node> virtualBaseSet)
           
protected  void setAllUserCodeVariablesUseful(Set<Node> virtualBaseSet)
          All the pointers that we need their points-to information are marked.
protected  void setUsefulVariables(Set<Node> initVars)
          The user can provide a set of variables that need refined points-to result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OfflineProcessor

public OfflineProcessor(int size,
                        GeomPointsTo pta)
Method Detail

runOptimizations

public void runOptimizations(Set<Node> virtualBaseSet)

recleanConstraints

public void recleanConstraints()
After one iteration of analysis, the unreachable methods may introduce new useless constraints.


buildInstanceAssignmentGraph

protected void buildInstanceAssignmentGraph()
Build the online assignment call graph with all the points-to facts.


destroy

protected void destroy()

setUsefulVariables

protected void setUsefulVariables(Set<Node> initVars)
The user can provide a set of variables that need refined points-to result.

Parameters:
initVars -

setAllUserCodeVariablesUseful

protected void setAllUserCodeVariablesUseful(Set<Node> virtualBaseSet)
All the pointers that we need their points-to information are marked.

Parameters:
virtualBaseSet -

eliminateUselessConstraints

protected void eliminateUselessConstraints()
Heavy-weight library is the major reason for the non-scalability of pointer analysis. However, most of the points-to relation of the library code is not useful for computing the points-to relations in the user's code. Finding out and eliminating the irrelevant library code is our optimization target. Methodology: We build the complete pointer assignment graph made by the Anderson's analysis. Performing a graph traversal to identify the variables that are defined in the library code and does not affect the user's code. Delete all the constraints containing those useless variables.


cleanSparkResults

protected void cleanSparkResults()
The pointers that we will refine in our context sensitive analysis do not need the spark results any more.


buildSymbolicAssignmentGraph

protected void buildSymbolicAssignmentGraph()
We totally rebuild the graph. The previous graph is destroyed.


makeTopologicalOrder

protected void makeTopologicalOrder()
Prepare for a near optimal worklist selection strategy inspired by Ben's PLDI 07 work.


mergeLocalVariables

protected void mergeLocalVariables()
As pointed out by the single entry graph contraction, temporary variables incur high redundancy in points-to relations. Find and eliminate the redundancies as early as possible. Our approach is : 1. Reuse the instance assignment graph; 2. If a variable q has only one incoming edge p -> q and p, q both local to the same function, then we merge them.