Package it.unive.lisa.analysis.traces
Class ExecutionTrace
- java.lang.Object
-
- it.unive.lisa.analysis.traces.ExecutionTrace
-
public class ExecutionTrace extends java.lang.Object
An execution trace, made ofTraceToken
s 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 boolean
equals(java.lang.Object obj)
TraceToken
getHead()
Yields the head of the execution trace.int
hashCode()
TraceToken
lastLoopTokenFor(it.unive.lisa.program.cfg.ProgramPoint guard)
Yields the last loop token (LoopSummary
orLoopIteration
) for the given guard, if any.int
numberOfBranches()
Yields the number ofBranching
tokens in this trace.ExecutionTrace
pop()
Removes the head of this trace.ExecutionTrace
push(TraceToken token)
Adds the givenTraceToken
at the top of this trace.java.lang.String
toString()
-
-
-
Method Detail
-
push
public ExecutionTrace push(TraceToken token)
Adds the givenTraceToken
at 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 ofBranching
tokens in this trace.- Returns:
- the number of branches
-
lastLoopTokenFor
public TraceToken lastLoopTokenFor(it.unive.lisa.program.cfg.ProgramPoint guard)
Yields the last loop token (LoopSummary
orLoopIteration
) for the given guard, if any.- Parameters:
guard
- the loop guard- Returns:
- the last (top-most) loop token for the given guard, or
null
if no such token exist
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-