Interface Fixpoint.FixpointImplementation<N,E,T>
-
- Type Parameters:
N
- the type of theNode
s in the source graphE
- the type of theEdge
s in the source graphT
- the type of data computed by the fixpoint
- All Known Implementing Classes:
AscendingFixpoint
,BackwardAscendingFixpoint
,BackwardCFGFixpoint
,BackwardDescendingGLBFixpoint
,BackwardDescendingNarrowingFixpoint
,CFGFixpoint
,DescendingGLBFixpoint
,DescendingNarrowingFixpoint
- Enclosing class:
- Fixpoint<G extends Graph<G,N,E>,N extends Node<G,N,E>,E extends Edge<G,N,E>,T>
public static interface Fixpoint.FixpointImplementation<N,E,T>
Concrete implementation of the general methods used by a fixpoint algorithm to perform.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
equality(N node, T approx, T old)
Given a node and two states, yields whether or not the most recent one has to be considered equal to the older one in terms of fixpoint iterations.T
operation(N node, T approx, T old)
Given a node and two states, joins the states (i.e.T
semantics(N node, T 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 throughunion(Object, Object, Object)
of the exit states of its predecessors.T
traverse(E edge, T 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).T
union(N node, T left, T right)
Given a node and two states, computes their union (i.e.
-
-
-
Method Detail
-
semantics
T semantics(N node, T entrystate) throws java.lang.Exception
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 throughunion(Object, Object, Object)
of the exit states of its predecessors.- Parameters:
node
- the node where the computation takes placeentrystate
- the computed state before the computation- Returns:
- the exit state
- Throws:
java.lang.Exception
- if something goes wrong during the computation
-
traverse
T traverse(E edge, T entrystate) throws java.lang.Exception
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).- Parameters:
edge
- the edge where the computation takes placeentrystate
- the state before traversing- Returns:
- the state after traversing
- Throws:
java.lang.Exception
- if something goes wrong during the computation
-
union
T union(N node, T left, T right) throws java.lang.Exception
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 throughtraverse(Object, Object)
.- Parameters:
node
- the node where the computation takes placeleft
- the first stateright
- the second state- Returns:
- the union of the states
- Throws:
java.lang.Exception
- if something goes wrong during the computation
-
operation
T operation(N node, T approx, T old) throws java.lang.Exception
Given a node and two states, joins the states (i.e. least upper bound or widening) together.
This callback is invoked after the exit state of a node has been computed throughsemantics(Object, Object)
, to join it with results from older fixpoint iterations.- Parameters:
node
- the node where the computation takes placeapprox
- the most recent stateold
- the older state- Returns:
- the joined state
- Throws:
java.lang.Exception
- if something goes wrong during the computation
-
equality
boolean equality(N node, T approx, T old) throws java.lang.Exception
Given a node and two states, yields whether or not the most recent one has to be considered equal to the older one in terms of fixpoint iterations. This means that if this method returnstrue
, than the result for the given node won't be updated and the successors of such node won't be added back to the list of nodes to process.
This callback is invoked after the exit state of a node has been computed throughsemantics(Object, Object)
and joined with the older one throughoperation(Object, Object, Object)
.- Parameters:
node
- the node where the computation takes placeapprox
- the most recent stateold
- the older state- Returns:
true
if there is no need to update the previous result,false
otherwise- Throws:
java.lang.Exception
- if something goes wrong during the computation
-
-