Record Class VerificationResult.Counterexample<I>

java.lang.Object
java.lang.Record
net.maswag.falcaun.verification.VerificationResult.Counterexample<I>
Type Parameters:
I - the type of the input at each step of the specification
Record Components:
property - the target specification violated by the learned Mealy machine
abstractInput - the abstract input word
hypothesisOutput - the abstract output word of the learned Mealy machine
sutOutput - the abstract output word observed by executing the SUL
confirmed - whether the observed trace of the SUL violates property
witness - the Mealy machine witnessing the violation by the learned Mealy machine
Enclosing class:
VerificationResult<I>

public static record VerificationResult.Counterexample<I>(TemporalLogic<I> property, net.automatalib.word.Word<String> abstractInput, net.automatalib.word.Word<String> hypothesisOutput, net.automatalib.word.Word<String> sutOutput, boolean confirmed, net.automatalib.automaton.transducer.MealyMachine<?,String,?,String> witness) extends Record
A counterexample candidate of a target specification.

The candidate is found by model checking of the learned Mealy machine. Its input is executed on the SUL, and the specification is checked on the observed abstract trace, i.e., the pair of abstractInput and sutOutput, by the same model checker. The candidate is confirmed if the observed trace violates the specification. The observed output may differ from the output of the learned Mealy machine even if the candidate is confirmed (see agreesWithHypothesis()).

  • Field Details

    • property

      private final TemporalLogic<I> property
      The field for the property record component.
    • abstractInput

      private final net.automatalib.word.Word<String> abstractInput
      The field for the abstractInput record component.
    • hypothesisOutput

      private final net.automatalib.word.Word<String> hypothesisOutput
      The field for the hypothesisOutput record component.
    • sutOutput

      private final net.automatalib.word.Word<String> sutOutput
      The field for the sutOutput record component.
    • confirmed

      private final boolean confirmed
      The field for the confirmed record component.
    • witness

      private final net.automatalib.automaton.transducer.MealyMachine<?,String,?,String> witness
      The field for the witness record component.
  • Constructor Details

    • Counterexample

      public Counterexample(TemporalLogic<I> property, net.automatalib.word.Word<String> abstractInput, net.automatalib.word.Word<String> hypothesisOutput, net.automatalib.word.Word<String> sutOutput, boolean confirmed, net.automatalib.automaton.transducer.MealyMachine<?,String,?,String> witness)
      Creates an instance of a Counterexample record class.
      Parameters:
      property - the value for the property record component
      abstractInput - the value for the abstractInput record component
      hypothesisOutput - the value for the hypothesisOutput record component
      sutOutput - the value for the sutOutput record component
      confirmed - the value for the confirmed record component
      witness - the value for the witness record component
  • Method Details

    • agreesWithHypothesis

      public boolean agreesWithHypothesis()
      Returns:
      true if and only if the SUL produced the same output as the learned Mealy machine. A disagreement means that the learned Mealy machine is not yet accurate for the input.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • property

      public TemporalLogic<I> property()
      Returns the value of the property record component.
      Returns:
      the value of the property record component
    • abstractInput

      public net.automatalib.word.Word<String> abstractInput()
      Returns the value of the abstractInput record component.
      Returns:
      the value of the abstractInput record component
    • hypothesisOutput

      public net.automatalib.word.Word<String> hypothesisOutput()
      Returns the value of the hypothesisOutput record component.
      Returns:
      the value of the hypothesisOutput record component
    • sutOutput

      public net.automatalib.word.Word<String> sutOutput()
      Returns the value of the sutOutput record component.
      Returns:
      the value of the sutOutput record component
    • confirmed

      public boolean confirmed()
      Returns the value of the confirmed record component.
      Returns:
      the value of the confirmed record component
    • witness

      public net.automatalib.automaton.transducer.MealyMachine<?,String,?,String> witness()
      Returns the value of the witness record component.
      Returns:
      the value of the witness record component