Class CFGResults<A extends it.unive.lisa.analysis.AbstractState<A,​H,​V,​T>,​H extends it.unive.lisa.analysis.heap.HeapDomain<H>,​V extends it.unive.lisa.analysis.value.ValueDomain<V>,​T extends it.unive.lisa.analysis.value.TypeDomain<T>>

  • Type Parameters:
    A - the type of AbstractState contained into the analysis state
    H - the type of HeapDomain contained into the computed abstract state
    V - the type of ValueDomain contained into the computed abstract state
    T - the type of TypeDomain contained into the computed abstract state
    All Implemented Interfaces:
    it.unive.lisa.analysis.Lattice<CFGResults<A,​H,​V,​T>>, java.lang.Iterable<java.util.Map.Entry<ContextSensitivityToken,​it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T>>>

    public class CFGResults<A extends it.unive.lisa.analysis.AbstractState<A,​H,​V,​T>,​H extends it.unive.lisa.analysis.heap.HeapDomain<H>,​V extends it.unive.lisa.analysis.value.ValueDomain<V>,​T extends it.unive.lisa.analysis.value.TypeDomain<T>>
    extends it.unive.lisa.analysis.lattices.FunctionalLattice<CFGResults<A,​H,​V,​T>,​ContextSensitivityToken,​it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T>>
    A FunctionalLattice from ContextSensitivityTokens to CFGWithAnalysisResultss. This class is meant to store fixpoint results on each token generated during the interprocedural analysis.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class it.unive.lisa.analysis.lattices.FunctionalLattice

        it.unive.lisa.analysis.lattices.FunctionalLattice.FunctionalLift<V extends it.unive.lisa.analysis.Lattice<V>>, it.unive.lisa.analysis.lattices.FunctionalLattice.KeyFunctionalLift<K extends java.lang.Object>
    • Field Summary

      • Fields inherited from class it.unive.lisa.analysis.lattices.FunctionalLattice

        function, lattice
      • Fields inherited from interface it.unive.lisa.analysis.Lattice

        BOTTOM_STRING, TOP_STRING
    • Constructor Summary

      Constructors 
      Constructor Description
      CFGResults​(it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T> lattice)
      Builds a new result.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CFGResults<A,​H,​V,​T> bottom()  
      boolean contains​(ContextSensitivityToken token)
      Yields true if a result exists for the given token.
      java.util.Collection<it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T>> getAll()
      Yields all the results stored in this object, for any possible ContextSensitivityToken used.
      CFGResults<A,​H,​V,​T> mk​(it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T> lattice, java.util.Map<ContextSensitivityToken,​it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T>> function)  
      org.apache.commons.lang3.tuple.Pair<java.lang.Boolean,​it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T>> putResult​(ContextSensitivityToken token, it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T> result)
      Stores the result of a fixpoint computation on a cfg, if needed.
      CFGResults<A,​H,​V,​T> top()  
      • Methods inherited from class it.unive.lisa.analysis.lattices.FunctionalLattice

        equals, functionalLift, getKeys, getMap, getState, getValues, glbKeys, hashCode, isBottom, isTop, iterator, lessOrEqualAux, lubAux, lubKeys, mkNewFunction, putState, toString, wideningAux
      • Methods inherited from class it.unive.lisa.analysis.BaseLattice

        lessOrEqual, lub, widening
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • CFGResults

        public CFGResults​(it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T> 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,​it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T>> putResult​(ContextSensitivityToken token,
                                                                                                                                                               it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T> result)
                                                                                                                                                        throws it.unive.lisa.analysis.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:
        it.unive.lisa.analysis.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
      • getAll

        public java.util.Collection<it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T>> getAll()
        Yields all the results stored in this object, for any possible ContextSensitivityToken used.
        Returns:
        the results
      • mk

        public CFGResults<A,​H,​V,​T> mk​(it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T> lattice,
                                                        java.util.Map<ContextSensitivityToken,​it.unive.lisa.analysis.CFGWithAnalysisResults<A,​H,​V,​T>> function)
        Specified by:
        mk in class it.unive.lisa.analysis.lattices.FunctionalLattice<CFGResults<A extends it.unive.lisa.analysis.AbstractState<A,​H,​V,​T>,​H extends it.unive.lisa.analysis.heap.HeapDomain<H>,​V extends it.unive.lisa.analysis.value.ValueDomain<V>,​T extends it.unive.lisa.analysis.value.TypeDomain<T>>,​ContextSensitivityToken,​it.unive.lisa.analysis.CFGWithAnalysisResults<A extends it.unive.lisa.analysis.AbstractState<A,​H,​V,​T>,​H extends it.unive.lisa.analysis.heap.HeapDomain<H>,​V extends it.unive.lisa.analysis.value.ValueDomain<V>,​T extends it.unive.lisa.analysis.value.TypeDomain<T>>>