Interface Analysis<V extends AbstractValue<V>,​S extends Store<S>,​T extends TransferFunction<V,​S>>

    • Method Detail

      • getDirection

        Analysis.Direction getDirection()
        Get the direction of this analysis.
        Returns:
        the direction of this analysis
      • isRunning

        boolean isRunning()
        Is the analysis currently running?
        Returns:
        true if the analysis is running currently, else false
      • performAnalysis

        void performAnalysis​(ControlFlowGraph cfg)
        Perform the actual analysis.
        Parameters:
        cfg - the control flow graph
      • performAnalysisBlock

        void performAnalysisBlock​(Block b)
        Perform the actual analysis on one block.
        Parameters:
        b - the block to analyze
      • runAnalysisFor

        S runAnalysisFor​(Node node,
                         Analysis.BeforeOrAfter preOrPost,
                         TransferInput<V,​S> blockTransferInput,
                         java.util.IdentityHashMap<Node,​V> nodeValues,
                         @Nullable java.util.Map<TransferInput<V,​S>,​java.util.IdentityHashMap<Node,​TransferResult<V,​S>>> analysisCaches)
        Runs the analysis again within the block of node and returns the store at the location of node. If before is true, then the store immediately before the Node node is returned. Otherwise, the store immediately after node is returned. If analysisCaches is not null, this method uses a cache. analysisCaches is a map of a block of node to the cached analysis result. If the cache for transferInput is not in analysisCaches, this method creates new cache and stores it in analysisCaches. The cache is a map of nodes to the analysis results of the nodes.
        Parameters:
        node - the node to analyze
        preOrPost - which store to return: the store immediately before node or the store after node
        blockTransferInput - the transfer input of the block of this node
        nodeValues - abstract values of nodes
        analysisCaches - caches of analysis results
        Returns:
        the store before or after node (depends on the value of before) after running the analysis
      • getResult

        AnalysisResult<V,​S> getResult()
        The result of running the analysis. This is only available once the analysis finished running.
        Returns:
        the result of running the analysis
      • getTransferFunction

        @Nullable T getTransferFunction()
        Get the transfer function of this analysis.
        Returns:
        the transfer function of this analysis
      • getInput

        @Nullable TransferInput<V,​S> getInput​(Block b)
        Get the transfer input of a given Block b.
        Parameters:
        b - a given Block
        Returns:
        the transfer input of this Block
      • getValue

        @Nullable V getValue​(Node n)
        Returns the abstract value for Node n, or null if no information is available. Note that if the analysis has not finished yet, this value might not represent the final value for this node.
        Parameters:
        n - n a node
        Returns:
        the abstract value for node n, or null if no information is available
      • getValue

        @Nullable V getValue​(com.sun.source.tree.Tree t)
        Return the abstract value for Tree t, or null if no information is available. Note that if the analysis has not finished yet, this value might not represent the final value for this node.
        Parameters:
        t - the given tree
        Returns:
        the abstract value for the given tree
      • getRegularExitStore

        @Nullable S getRegularExitStore()
        Returns the regular exit store, or null, if there is no such store (because the method cannot exit through the regular exit block).
        Returns:
        the regular exit store, or null, if there is no such store (because the method cannot exit through the regular exit block)
      • getExceptionalExitStore

        @Nullable S getExceptionalExitStore()
        Returns the exceptional exit store.
        Returns:
        the exceptional exit store