Package it.unive.lisa.program.cfg.edge
Class Edge
- java.lang.Object
-
- it.unive.lisa.program.cfg.edge.Edge
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description <V> booleanaccept(GraphVisitor<CFG,Statement,Edge,V> visitor, V tool)Accepts the givenGraphVisitor.booleanequals(java.lang.Object obj)StatementgetDestination()Yields the node where this edge ends.StatementgetSource()Yields the node where this edge originates.inthashCode()abstract java.lang.StringtoString()abstract <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.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface it.unive.lisa.util.datastructures.graph.Edge
canBeSimplified, newInstance
-
-
-
-
Method Detail
-
getSource
public final Statement getSource()
Description copied from interface:EdgeYields the node where this edge originates.
-
getDestination
public final Statement getDestination()
Description copied from interface:EdgeYields the node where this edge ends.- Specified by:
getDestinationin interfaceEdge<Statement,Edge,CFG>- Returns:
- the destination node
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public abstract java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
traverse
public abstract <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
Traverses this edge, optionally modifying the givensourceStateby applying semantic assumptions.- 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
-
accept
public <V> boolean accept(GraphVisitor<CFG,Statement,Edge,V> visitor, V tool)
Description copied from interface:EdgeAccepts the givenGraphVisitor. Implementors of this method are responsible for invokingGraphVisitor.visit(Object, Graph, Edge)on this edge. The visiting should stop if such call returnsfalse.- Specified by:
acceptin interfaceEdge<Statement,Edge,CFG>- Type Parameters:
V- the type of auxiliary tool thatvisitorcan use- Parameters:
visitor- the visitor that is visiting theGraphcontaining this edgetool- the auxiliary tool thatvisitorcan use- Returns:
- whether or not the visiting should stop when this call returns, as decided by the visitor itself
-
-