Class OptimizedFixpoint<A extends AbstractState<A>>
- java.lang.Object
-
- it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint<CFG,Statement,Edge,CFGFixpoint.CompoundState<A>>
-
- it.unive.lisa.program.cfg.fixpoints.OptimizedFixpoint<A>
-
- Type Parameters:
A
- the type ofAbstractState
contained into the analysis state
public class OptimizedFixpoint<A extends AbstractState<A>> extends Fixpoint<CFG,Statement,Edge,CFGFixpoint.CompoundState<A>>
A fixpoint algorithm for aGraph
, parametric to theFixpoint.FixpointImplementation
that one wants to use to compute the results. This fixpoint algorithms is optimized: it works exploiting the basic blocks of the target graph, and only yields approximations of widening points, stopping statements and user-defined hotspots.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint
Fixpoint.FixpointImplementation<N,E,T>
-
-
Field Summary
-
Fields inherited from class it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint
ERROR, forceFullEvaluation, graph
-
-
Constructor Summary
Constructors Constructor Description OptimizedFixpoint(CFG graph, boolean forceFullEvaluation, java.util.function.Predicate<Statement> hotspots)
Builds an optimized fixpoint for the givenGraph
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<Statement,CFGFixpoint.CompoundState<A>>
fixpoint(java.util.Map<Statement,CFGFixpoint.CompoundState<A>> startingPoints, WorkingSet<Statement> ws, Fixpoint.FixpointImplementation<Statement,Edge,CFGFixpoint.CompoundState<A>> implementation, java.util.Map<Statement,CFGFixpoint.CompoundState<A>> initialResult)
Runs the fixpoint.-
Methods inherited from class it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint
fixpoint, getEntryState
-
-
-
-
Constructor Detail
-
OptimizedFixpoint
public OptimizedFixpoint(CFG graph, boolean forceFullEvaluation, java.util.function.Predicate<Statement> hotspots)
Builds an optimized fixpoint for the givenGraph
.- Parameters:
graph
- the source graphforceFullEvaluation
- whether or not the fixpoint should evaluate all nodes independently of the fixpoint implementationhotspots
- the predicate to identify additional statements whose approximation must be preserved in the results
-
-
Method Detail
-
fixpoint
public java.util.Map<Statement,CFGFixpoint.CompoundState<A>> fixpoint(java.util.Map<Statement,CFGFixpoint.CompoundState<A>> startingPoints, WorkingSet<Statement> ws, Fixpoint.FixpointImplementation<Statement,Edge,CFGFixpoint.CompoundState<A>> implementation, java.util.Map<Statement,CFGFixpoint.CompoundState<A>> initialResult) throws FixpointException
Description copied from class:Fixpoint
Runs the fixpoint. Invoking this method effectively recomputes the result: no caching on previous runs is executed.- Overrides:
fixpoint
in classFixpoint<CFG,Statement,Edge,CFGFixpoint.CompoundState<A extends AbstractState<A>>>
- Parameters:
startingPoints
- a map containing all the nodes to start the fixpoint at, each mapped to its entry state.ws
- the instance ofWorkingSet
to use for the fixpointimplementation
- theFixpoint.FixpointImplementation
to use for running the fixpointinitialResult
- the map of initial result to use for running the fixpoint- Returns:
- a mapping from each (reachable) node of the source graph to the fixpoint result computed at that node
- Throws:
FixpointException
- if something goes wrong during the fixpoint execution
-
-