Package it.unive.lisa.analysis.traces
Class ExecutionTrace
- java.lang.Object
-
- it.unive.lisa.analysis.traces.ExecutionTrace
-
public class ExecutionTrace extends java.lang.ObjectAn execution trace, made ofTraceTokens representing the intraprocedural control-flow instructions that have been traversed up to now.
-
-
Constructor Summary
Constructors Constructor Description ExecutionTrace()Builds a new empty execution trace.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)TraceTokengetHead()Yields the head of the execution trace.inthashCode()TraceTokenlastLoopTokenFor(it.unive.lisa.program.cfg.ProgramPoint guard)Yields the last loop token (LoopSummaryorLoopIteration) for the given guard, if any.intnumberOfBranches()Yields the number ofBranchingtokens in this trace.ExecutionTracepop()Removes the head of this trace.ExecutionTracepush(TraceToken token)Adds the givenTraceTokenat the top of this trace.java.lang.StringtoString()
-
-
-
Method Detail
-
push
public ExecutionTrace push(TraceToken token)
Adds the givenTraceTokenat the top of this trace.- Parameters:
token- the token to add- Returns:
- the updated trace
-
pop
public ExecutionTrace pop()
Removes the head of this trace.- Returns:
- the updated trace
-
getHead
public TraceToken getHead()
Yields the head of the execution trace.- Returns:
- the head
-
numberOfBranches
public int numberOfBranches()
Yields the number ofBranchingtokens in this trace.- Returns:
- the number of branches
-
lastLoopTokenFor
public TraceToken lastLoopTokenFor(it.unive.lisa.program.cfg.ProgramPoint guard)
Yields the last loop token (LoopSummaryorLoopIteration) for the given guard, if any.- Parameters:
guard- the loop guard- Returns:
- the last (top-most) loop token for the given guard, or
nullif no such token exist
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-