Module dev.civl.gmc
Package dev.civl.gmc

Class Trace<TRANSITION,STATE>

java.lang.Object
dev.civl.gmc.Trace<TRANSITION,STATE>
Type Parameters:
TRANSITION - the type used to represent transitions in the state-transition system being analyzed
STATE - the type used to represent states in the state-transition system being analyzed

public class Trace<TRANSITION,STATE> extends Object
This represents a trace of an execution of a given model.
  • Constructor Details

    • Trace

      public Trace(String name, STATE init)
      Creates a new instance of Trace.
      Parameters:
      name - The name of the new trace.
      init - The initial state of the new trace.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • init

      public STATE init()
      Returns the initial state of this trace.
      Returns:
      the initial state of this trace.
    • name

      public String name()
      Returns the name of this trace.
      Returns:
      the name of this trace.
    • result

      public boolean result()
      Returns the verification result of this trace.
      Returns:
      the verification result of this trace.
    • violation

      public boolean violation()
      Returns true iff a least one violations have been encountered.
      Returns:
      true iff a least one violations have been encountered.
    • setViolation

      public void setViolation(boolean val)
      Updates the flag of violation.
      Parameters:
      val - The value to use as the flag of violation.
    • lastState

      public STATE lastState()
      Returns the last state of this trace.
      Returns:
      the last state of this trace.
    • addTraceStep

      public void addTraceStep(TraceStepIF<STATE> traceStep)
      Adds a new trace step to this trace.
      Parameters:
      traceStep - The new trace step to be added.
    • traceSteps

      public List<TraceStepIF<STATE>> traceSteps()
      Returns the list of trace steps contained in this trace.
      Returns:
      the list of trace steps contained in this trace.
    • traceStep

      public TraceStepIF<STATE> traceStep(int i)
      Returns the i'th trace step of this trace.
      Parameters:
      i - The index of the trace step to be returned.
      Returns:
      the i'th trace step of this trace.
    • numOfSteps

      public int numOfSteps()
      Returns the number of trace steps in this trace.
      Returns:
      the number of trace steps in this trace.