Class BasicAbstractDataflowAnalysis<Fact>

    • Constructor Detail

      • BasicAbstractDataflowAnalysis

        public BasicAbstractDataflowAnalysis()
        Constructor.
    • Method Detail

      • resultFactIterator

        public java.util.Iterator<Fact> resultFactIterator()
        Get an iterator over the result facts.
      • factToString

        public java.lang.String factToString​(Fact fact)
        Description copied from interface: DataflowAnalysis
        Return a String representation of given Fact. For debugging purposes.
        Specified by:
        factToString in interface DataflowAnalysis<Fact>
        Parameters:
        fact - a dataflow fact
        Returns:
        String representation of the fact
      • getFactAtLocation

        public Fact getFactAtLocation​(Location location)
                               throws DataflowAnalysisException
        Get dataflow fact at (just before) given Location. Note "before" is meant in the logical sense, so for backward analyses, before means after the location in the control flow sense.

        The default implementation ignores instructions within basic blocks. Subclasses that model individual instructions must override this method.

        Specified by:
        getFactAtLocation in interface DataflowAnalysis<Fact>
        Parameters:
        location - the Location
        Returns:
        the dataflow value at given Location
        Throws:
        DataflowAnalysisException
      • getFactAfterLocation

        public Fact getFactAfterLocation​(Location location)
                                  throws DataflowAnalysisException
        Get the dataflow fact representing the point just after given Location. Note "after" is meant in the logical sense, so for backward analyses, after means before the location in the control flow sense.

        The default implementation ignores instructions within basic blocks. Subclasses that model individual instructions must override this method.

        Specified by:
        getFactAfterLocation in interface DataflowAnalysis<Fact>
        Parameters:
        location - the Location
        Returns:
        the dataflow value after given Location
        Throws:
        DataflowAnalysisException
      • startIteration

        public void startIteration()
        Description copied from interface: DataflowAnalysis
        Called before beginning an iteration of analysis. Each iteration visits every basic block in the CFG.
        Specified by:
        startIteration in interface DataflowAnalysis<Fact>
      • edgeTransfer

        public void edgeTransfer​(Edge edge,
                                 Fact fact)
                          throws DataflowAnalysisException
        Description copied from interface: DataflowAnalysis
        Edge transfer function. Modify the given fact that is true on the (logical) edge source to modify it so that it is true at the (logical) edge target.

        A do-nothing implementation is legal, and appropriate for analyses where branches are not significant.

        Specified by:
        edgeTransfer in interface DataflowAnalysis<Fact>
        Parameters:
        edge - the Edge
        fact - a dataflow fact
        Throws:
        DataflowAnalysisException