Class OfflineProcessor


  • public class OfflineProcessor
    extends Object
    Implementation of pre-processing algorithms performed prior to the pointer analysis. Currently supported techniques are: 1. Pointer distillation: the library code that does not impact the application code pointers is removed; 2. Pointer ranking for worklist prioritizing.
    Author:
    xiao
    • Constructor Detail

      • OfflineProcessor

        public OfflineProcessor​(GeomPointsTo pta)
    • Method Detail

      • init

        public void init()
        Call it before running the optimizations.
      • defaultFeedPtsRoutines

        public void defaultFeedPtsRoutines()
      • addUserDefPts

        public void addUserDefPts​(Set<Node> initVars)
        Compute the refined points-to results for specified pointers.
        Parameters:
        initVars -
      • releaseSparkMem

        public void releaseSparkMem()
      • runOptimizations

        public void runOptimizations()
        Preprocess the pointers and constraints before running geomPA.
        Parameters:
        useSpark -
        multiCallsites -
      • destroy

        public void destroy()
      • buildDependenceGraph

        protected void buildDependenceGraph()
        The dependence graph reverses the assignment relations. E.g., p = q => p -> q Note that, the assignments that are eliminated by local variable merging should be used here. Otherwise, the graph would be erroneously disconnected.
      • setAllUserCodeVariablesUseful

        protected void setAllUserCodeVariablesUseful()
        All the pointers that we need their points-to information are marked.
        Parameters:
        virtualBaseSet -
      • computeReachablePts

        protected void computeReachablePts()
        Compute a set of pointers that required to refine the seed pointers. Prerequisite: dependence graph
      • distillConstraints

        protected void distillConstraints()
        Eliminate the constraints that do not contribute points-to information to the seed pointers. Prerequisite: dependence graph
      • buildImpactGraph

        protected void buildImpactGraph()
        The dependence graph will be destroyed and the impact graph will be built. p = q means q impacts p. Therefore, we add en edge q -> p in impact graph.
      • computeWeightsForPts

        protected void computeWeightsForPts()
        Prepare for a near optimal worklist selection strategy inspired by Ben's PLDI 07 work. Prerequisite: impact graph