Package net.maswag.falcaun.verification
Record Class VerificationResult<I>
java.lang.Object
java.lang.Record
net.maswag.falcaun.verification.VerificationResult<I>
- Type Parameters:
I- the type of the input at each step of the target specifications- Record Components:
counterexamples- the counterexample candidates found on the learned Mealy machine, including the ones not confirmed by the SUL. At most one candidate is reported for each target specification.unresolved- the target specifications without a confirmed counterexampletargetCount- the number of the target specifications, including the ones given only as LTL formulasreason- the reason why black-box checking terminatedstatistics- the statistics of black-box checkingfailure- the cause of the termination ifreasonisVerificationResult.TerminationReason.EXECUTION_FAILURE. The counterexamples confirmed before the failure are still reported.
public record VerificationResult<I>(List<VerificationResult.Counterexample<I>> counterexamples, List<TemporalLogic<I>> unresolved, int targetCount, VerificationResult.TerminationReason reason, VerificationResult.Statistics statistics, Optional<Throwable> failure)
extends Record
The result of black-box checking by
BlackBoxVerifier or NumericSULVerifier.
A target specification is falsified only if a counterexample is confirmed by the observation of the SUL
(see VerificationResult.Counterexample.confirmed()). The other target specifications are unresolved.
The counterexamples and the unresolved specifications are reported only for the target specifications represented
as TemporalLogic formulas. A target specification given only as an LTL formula (e.g., by
StopDisprovedEQOracle.StaticLTLList) is counted in targetCount but appears in neither list, so
allTargetsFalsified() is conservatively false for it.
Notice that an unresolved specification is not proved to be satisfied by the SUL: black-box checking is a testing
method and cannot prove the absence of counterexamples.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA counterexample candidate of a target specification.static final recordStatistics of black-box checking.static enumThe reason why black-box checking terminated. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<VerificationResult.Counterexample<I>> The field for thecounterexamplesrecord component.The field for thefailurerecord component.private final VerificationResult.TerminationReasonThe field for thereasonrecord component.private final VerificationResult.StatisticsThe field for thestatisticsrecord component.private final intThe field for thetargetCountrecord component.private final List<TemporalLogic<I>> The field for theunresolvedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionVerificationResult(List<VerificationResult.Counterexample<I>> counterexamples, List<TemporalLogic<I>> unresolved, int targetCount, VerificationResult.TerminationReason reason, VerificationResult.Statistics statistics, Optional<Throwable> failure) Creates an instance of aVerificationResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecounterexamplesrecord component.final booleanIndicates whether some other object is "equal to" this one.failure()Returns the value of thefailurerecord component.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.Returns the value of thestatisticsrecord component.intReturns the value of thetargetCountrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theunresolvedrecord component.withStatistics(VerificationResult.Statistics statistics)
-
Field Details
-
counterexamples
The field for thecounterexamplesrecord component. -
unresolved
The field for theunresolvedrecord component. -
targetCount
private final int targetCountThe field for thetargetCountrecord component. -
reason
The field for thereasonrecord component. -
statistics
The field for thestatisticsrecord component. -
failure
The field for thefailurerecord component.
-
-
Constructor Details
-
VerificationResult
public VerificationResult(List<VerificationResult.Counterexample<I>> counterexamples, List<TemporalLogic<I>> unresolved, int targetCount, VerificationResult.TerminationReason reason, VerificationResult.Statistics statistics, Optional<Throwable> failure) Creates an instance of aVerificationResultrecord class.- Parameters:
counterexamples- the value for thecounterexamplesrecord componentunresolved- the value for theunresolvedrecord componenttargetCount- the value for thetargetCountrecord componentreason- the value for thereasonrecord componentstatistics- the value for thestatisticsrecord componentfailure- the value for thefailurerecord component
-
-
Method Details
-
confirmedCounterexamples
- Returns:
- the counterexamples confirmed by the SUL
-
falsified
- Returns:
- the target specifications falsified by a confirmed counterexample
-
allTargetsFalsified
public boolean allTargetsFalsified()- Returns:
trueif and only if all the target specifications are falsified by confirmed counterexamples. This is conservativelyfalseif some target specifications are given only as LTL formulas.
-
withStatistics
- Returns:
- a copy of this result with the given statistics
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
counterexamples
Returns the value of thecounterexamplesrecord component.- Returns:
- the value of the
counterexamplesrecord component
-
unresolved
Returns the value of theunresolvedrecord component.- Returns:
- the value of the
unresolvedrecord component
-
targetCount
public int targetCount()Returns the value of thetargetCountrecord component.- Returns:
- the value of the
targetCountrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
statistics
Returns the value of thestatisticsrecord component.- Returns:
- the value of the
statisticsrecord component
-
failure
Returns the value of thefailurerecord component.- Returns:
- the value of the
failurerecord component
-