Package it.unive.lisa.program.cfg.edge
Class FalseEdge
- java.lang.Object
-
- it.unive.lisa.program.cfg.edge.Edge
-
- it.unive.lisa.program.cfg.edge.FalseEdge
-
- All Implemented Interfaces:
CodeEdge<CFG,Statement,Edge>
,Edge<CFG,Statement,Edge>
,java.lang.Comparable<Edge>
public class FalseEdge extends Edge
An edge connecting two statements, that is traversed when the condition expressed in the source state does not hold. The abstract analysis state gets modified by assuming that the statement where this edge originates does not hold.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isUnconditional()
Yieldstrue
if and only if this edge represent unconditional execution flow between its bounds.FalseEdge
newInstance(Statement source, Statement destination)
Builds a new instance of this edge, connecting the given nodes.java.lang.String
toString()
<A extends AbstractState<A>>
AnalysisState<A>traverseBackwards(AnalysisState<A> state)
Traverses this edge in the backward direction, from destination to source, optionally modifying the givensourceState
by applying semantic assumptions.<A extends AbstractState<A>>
AnalysisState<A>traverseForward(AnalysisState<A> state)
Traverses this edge in the forward direction, proceeding from source to destination, optionally modifying the givensourceState
by applying semantic assumptions.
-
-
-
Method Detail
-
traverseForward
public <A extends AbstractState<A>> AnalysisState<A> traverseForward(AnalysisState<A> state) throws SemanticException
Description copied from class:Edge
Traverses this edge in the forward direction, proceeding from source to destination, optionally modifying the givensourceState
by applying semantic assumptions.- Specified by:
traverseForward
in classEdge
- Type Parameters:
A
- the concreteAbstractState
instance- Parameters:
state
- theAnalysisState
computed at the source of this edge- Returns:
- the
AnalysisState
after traversing this edge - Throws:
SemanticException
- if something goes wrong during the computation
-
traverseBackwards
public <A extends AbstractState<A>> AnalysisState<A> traverseBackwards(AnalysisState<A> state) throws SemanticException
Description copied from class:Edge
Traverses this edge in the backward direction, from destination to source, optionally modifying the givensourceState
by applying semantic assumptions.- Specified by:
traverseBackwards
in classEdge
- Type Parameters:
A
- the concreteAbstractState
instance- Parameters:
state
- theAnalysisState
computed at the destination of this edge- Returns:
- the
AnalysisState
after traversing this edge - Throws:
SemanticException
- if something goes wrong during the computation
-
isUnconditional
public boolean isUnconditional()
Description copied from interface:CodeEdge
Yieldstrue
if and only if this edge represent unconditional execution flow between its bounds. This means that (i) it could be simplified if one of the nodes connected to it is simplified (i.e., removed from the graph), and (ii) the graph containing it can avoid storing the edge if its bounds are subsequent.- Returns:
- whether or not this edge can be simplified
-
newInstance
public FalseEdge newInstance(Statement source, Statement destination)
Description copied from interface:CodeEdge
Builds a new instance of this edge, connecting the given nodes.- Parameters:
source
- the source nodedestination
- the destination node- Returns:
- a new instance of this edge, connecting the given nodes
-
-