Class ForwardAnalysisImpl<V extends AbstractValue<V>,S extends Store<S>,T extends ForwardTransferFunction<V,S>>

java.lang.Object
org.checkerframework.dataflow.analysis.AbstractAnalysis<V,S,T>
org.checkerframework.dataflow.analysis.ForwardAnalysisImpl<V,S,T>
Type Parameters:
V - the abstract value type to be tracked by the analysis
S - the store type used in the analysis
T - the transfer function type that is used to approximate run-time behavior
All Implemented Interfaces:
Analysis<V,S,T>, ForwardAnalysis<V,S,T>
Direct Known Subclasses:
CFAbstractAnalysis

public class ForwardAnalysisImpl<V extends AbstractValue<V>,S extends Store<S>,T extends ForwardTransferFunction<V,S>> extends AbstractAnalysis<V,S,T> implements ForwardAnalysis<V,S,T>
An implementation of a forward analysis to solve a org.checkerframework.dataflow problem given a control flow graph and a forward transfer function.
  • Field Details

    • blockCount

      protected final @Nullable IdentityHashMap<Block,Integer> blockCount
      Number of times each block has been analyzed since the last time widening was applied. Null if maxCountBeforeWidening is -1, which implies widening isn't used for this analysis.
    • maxCountBeforeWidening

      protected final int maxCountBeforeWidening
      Number of times a block can be analyzed before widening. -1 implies that widening shouldn't be used.
    • thenStores

      protected final IdentityHashMap<Block,S extends Store<S>> thenStores
      Then stores before every basic block (assumed to be 'no information' if not present).
    • elseStores

      protected final IdentityHashMap<Block,S extends Store<S>> elseStores
      Else stores before every basic block (assumed to be 'no information' if not present).
    • storesAtReturnStatements

      protected final IdentityHashMap<ReturnNode,TransferResult<V extends AbstractValue<V>,S extends Store<S>>> storesAtReturnStatements
      The stores after every return statement.
  • Constructor Details

    • ForwardAnalysisImpl

      public ForwardAnalysisImpl(int maxCountBeforeWidening)
      Construct an object that can perform a org.checkerframework.dataflow forward analysis over a control flow graph. When using this constructor, the transfer function is set later by the subclass, e.g., org.checkerframework.framework.flow.CFAbstractAnalysis.
      Parameters:
      maxCountBeforeWidening - number of times a block can be analyzed before widening
    • ForwardAnalysisImpl

      public ForwardAnalysisImpl(T transferFunction)
      Construct an object that can perform a org.checkerframework.dataflow forward analysis over a control flow graph given a transfer function.
      Parameters:
      transferFunction - the transfer function
  • Method Details