Class CFGResults<A extends AbstractState<A,​H,​V>,​H extends HeapDomain<H>,​V extends ValueDomain<V>>

    • Constructor Detail

      • CFGResults

        public CFGResults​(CFGWithAnalysisResults<A,​H,​V> lattice)
        Builds a new result.
        Parameters:
        lattice - a singleton instance used for retrieving top and bottom values
    • Method Detail

      • putResult

        public org.apache.commons.lang3.tuple.Pair<java.lang.Boolean,​CFGWithAnalysisResults<A,​H,​V>> putResult​(ContextSensitivityToken token,
                                                                                                                                CFGWithAnalysisResults<A,​H,​V> result)
                                                                                                                         throws SemanticException
        Stores the result of a fixpoint computation on a cfg, if needed. This method returns a pair of a boolean and a CFGWithAnalysisResults, where (prev is the CFGWithAnalysisResults already present for the given token):
        • if no prev was stored for token, than that token is mapped to result and this method returns <false, result>
        • if prev <= result, then token is mapped to result and this method returns <true, result>
        • if result <= prev, then the mapping is left untouched and this method returns <false, prev>
        • otherwise, token is mapped to lub = prev.lub(result) and this method returns <true, lub>
        The value returned by this method is intended to be a hint that a new fixpoint computation is needed to ensure that the results are stable.
        Parameters:
        token - the ContextSensitivityToken that identifying the result
        result - the CFGWithAnalysisResults to store
        Returns:
        true if the previous result has been updated, if any
        Throws:
        SemanticException - if something goes wrong during the update
      • contains

        public boolean contains​(ContextSensitivityToken token)
        Yields true if a result exists for the given token.
        Parameters:
        token - the ContextSensitivityToken that identifying the result
        Returns:
        true if that condition holds
      • top

        public CFGResults<A,​H,​V> top()
        Description copied from interface: Lattice
        Yields the top element of this lattice. The returned element should be unique across different calls to this method, since Lattice.isTop() uses reference equality by default. If the value returned by this method is not a singleton, override Lattice.isTop() accordingly to provide a coherent test.
        Returns:
        the top element
      • isTop

        public boolean isTop()
        Description copied from interface: Lattice
        Yields true if and only if this object represents the top of the lattice. The default implementation of this method uses reference equality between this and the value returned by Lattice.top(), thus assuming that the top element is a singleton. If this is not the case, override this method accordingly to provide a coherent test.
        Returns:
        true if this is the top of the lattice
      • bottom

        public CFGResults<A,​H,​V> bottom()
        Description copied from interface: Lattice
        Yields the bottom element of this lattice. The returned element should be unique across different calls to this method, since Lattice.isBottom() uses reference equality by default. If the value returned by this method is not a singleton, override Lattice.isBottom() accordingly to provide a coherent test.
        Returns:
        the bottom element
      • isBottom

        public boolean isBottom()
        Description copied from interface: Lattice
        Yields true if and only if this object represents the bottom of the lattice. The default implementation of this method uses reference equality between this and the value returned by Lattice.bottom(), thus assuming that the bottom element is a singleton. If this is not the case, override this method accordingly to provide a coherent test.
        Returns:
        true if this is the bottom of the lattice