Package it.unive.lisa.program.cfg.edge
Class TrueEdge
- java.lang.Object
-
- it.unive.lisa.program.cfg.edge.Edge
-
- it.unive.lisa.program.cfg.edge.TrueEdge
-
public class TrueEdge extends Edge
An edge connecting two statements, that is traversed when the condition expressed in the source state holds. The abstract analysis state gets modified by assuming that the statement where this edge originates does hold.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanBeSimplified()Yieldstrueif and only if this edge could be simplified if one of the nodes connected to it is simplified (i.e., removed from the graph).TrueEdgenewInstance(Statement source, Statement destination)Builds a new instance of this edge, connecting the given nodes.java.lang.StringtoString()<A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>>
AnalysisState<A,H,V>traverse(AnalysisState<A,H,V> sourceState)Traverses this edge, optionally modifying the givensourceStateby applying semantic assumptions.
-
-
-
Method Detail
-
traverse
public <A extends AbstractState<A,H,V>,H extends HeapDomain<H>,V extends ValueDomain<V>> AnalysisState<A,H,V> traverse(AnalysisState<A,H,V> sourceState) throws SemanticException
Description copied from class:EdgeTraverses this edge, optionally modifying the givensourceStateby applying semantic assumptions.- Specified by:
traversein classEdge- Type Parameters:
A- the concreteAbstractStateinstanceH- the concreteHeapDomaininstanceV- the concreteValueDomaininstance- Parameters:
sourceState- theAnalysisStatecomputed at the source of this edge- Returns:
- the
AnalysisStateafter traversing this edge - Throws:
SemanticException- if something goes wrong during the computation
-
canBeSimplified
public boolean canBeSimplified()
Description copied from interface:EdgeYieldstrueif and only if this edge could be simplified if one of the nodes connected to it is simplified (i.e., removed from the graph).- Returns:
- whether or not this edge can be simplified
-
newInstance
public TrueEdge newInstance(Statement source, Statement destination)
Description copied from interface:EdgeBuilds 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
-
-