Class BackwardCFGFixpoint<A extends AbstractState<A>>
- java.lang.Object
-
- it.unive.lisa.program.cfg.fixpoints.BackwardCFGFixpoint<A>
-
- Type Parameters:
A
- the type ofAbstractState
contained into the analysis state computed by the fixpoint
- All Implemented Interfaces:
Fixpoint.FixpointImplementation<Statement,Edge,CFGFixpoint.CompoundState<A>>
- Direct Known Subclasses:
BackwardAscendingFixpoint
,BackwardDescendingGLBFixpoint
,BackwardDescendingNarrowingFixpoint
public abstract class BackwardCFGFixpoint<A extends AbstractState<A>> extends java.lang.Object implements Fixpoint.FixpointImplementation<Statement,Edge,CFGFixpoint.CompoundState<A>>
AFixpoint.FixpointImplementation
forCFG
s.
-
-
Field Summary
Fields Modifier and Type Field Description protected CFG
graph
The graph targeted by this implementation.protected InterproceduralAnalysis<A>
interprocedural
TheInterproceduralAnalysis
to use for semantics invocations.
-
Constructor Summary
Constructors Constructor Description BackwardCFGFixpoint(CFG graph, InterproceduralAnalysis<A> interprocedural)
Builds the fixpoint implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CFGFixpoint.CompoundState<A>
semantics(Statement node, CFGFixpoint.CompoundState<A> entrystate)
Given a node and its entry state, computes its exit state relying on its semantics.
This callback is invoked after the overall entry state for a node has been computed throughFixpoint.FixpointImplementation.union(Object, Object, Object)
of the exit states of its predecessors.CFGFixpoint.CompoundState<A>
traverse(Edge edge, CFGFixpoint.CompoundState<A> entrystate)
Given an edge and a state, computes a new state by modifying the given one assuming that the edge gets traversed.
This callback is invoked while computing the overall entry state for a node to filter a state according to the logic of the edge (an edge might be always traversed, or only if a condition holds).CFGFixpoint.CompoundState<A>
union(Statement node, CFGFixpoint.CompoundState<A> left, CFGFixpoint.CompoundState<A> right)
Given a node and two states, computes their union (i.e.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface it.unive.lisa.util.datastructures.graph.algorithms.Fixpoint.FixpointImplementation
equality, operation
-
-
-
-
Field Detail
-
graph
protected final CFG graph
The graph targeted by this implementation.
-
interprocedural
protected final InterproceduralAnalysis<A extends AbstractState<A>> interprocedural
TheInterproceduralAnalysis
to use for semantics invocations.
-
-
Constructor Detail
-
BackwardCFGFixpoint
public BackwardCFGFixpoint(CFG graph, InterproceduralAnalysis<A> interprocedural)
Builds the fixpoint implementation.- Parameters:
graph
- the graph targeted by this implementationinterprocedural
- theInterproceduralAnalysis
to use for semantics invocation
-
-
Method Detail
-
semantics
public CFGFixpoint.CompoundState<A> semantics(Statement node, CFGFixpoint.CompoundState<A> entrystate) throws SemanticException
Description copied from interface:Fixpoint.FixpointImplementation
Given a node and its entry state, computes its exit state relying on its semantics.
This callback is invoked after the overall entry state for a node has been computed throughFixpoint.FixpointImplementation.union(Object, Object, Object)
of the exit states of its predecessors.- Specified by:
semantics
in interfaceFixpoint.FixpointImplementation<Statement,Edge,CFGFixpoint.CompoundState<A extends AbstractState<A>>>
- Parameters:
node
- the node where the computation takes placeentrystate
- the computed state before the computation- Returns:
- the exit state
- Throws:
SemanticException
-
traverse
public CFGFixpoint.CompoundState<A> traverse(Edge edge, CFGFixpoint.CompoundState<A> entrystate) throws SemanticException
Description copied from interface:Fixpoint.FixpointImplementation
Given an edge and a state, computes a new state by modifying the given one assuming that the edge gets traversed.
This callback is invoked while computing the overall entry state for a node to filter a state according to the logic of the edge (an edge might be always traversed, or only if a condition holds).- Specified by:
traverse
in interfaceFixpoint.FixpointImplementation<Statement,Edge,CFGFixpoint.CompoundState<A extends AbstractState<A>>>
- Parameters:
edge
- the edge where the computation takes placeentrystate
- the state before traversing- Returns:
- the state after traversing
- Throws:
SemanticException
-
union
public CFGFixpoint.CompoundState<A> union(Statement node, CFGFixpoint.CompoundState<A> left, CFGFixpoint.CompoundState<A> right) throws SemanticException
Description copied from interface:Fixpoint.FixpointImplementation
Given a node and two states, computes their union (i.e. least upper bound, not widening).
This callback is invoked for the computation of the overall entry state for a node to merge the exit states of its predecessors, after traversing the edges connecting them throughFixpoint.FixpointImplementation.traverse(Object, Object)
.- Specified by:
union
in interfaceFixpoint.FixpointImplementation<Statement,Edge,CFGFixpoint.CompoundState<A extends AbstractState<A>>>
- Parameters:
node
- the node where the computation takes placeleft
- the first stateright
- the second state- Returns:
- the union of the states
- Throws:
SemanticException
-
-