Class ExecutionTrace


  • public class ExecutionTrace
    extends java.lang.Object
    An execution trace, made of TraceTokens representing the intraprocedural control-flow instructions that have been traversed up to now.
    • Constructor Detail

      • ExecutionTrace

        public ExecutionTrace()
        Builds a new empty execution trace.
    • Method Detail

      • push

        public ExecutionTrace push​(TraceToken token)
        Adds the given TraceToken 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 of Branching 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 or LoopIteration) 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 class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object