EvaluationResult class

Represents the outcome of evaluating a Formula against a Trace.

This class encapsulates the result of checking if a temporal logic formula holds true for a given sequence of timed events.

It contains not only whether the formula holds but also optional diagnostic information like a failure reason and the specific time (relatedTimestamp) or index (relatedIndex) within the trace that is most pertinent to the result, especially in case of failure.

This class is immutable.

Annotations
  • @immutable

Constructors

EvaluationResult.new(bool holds, {String? reason, Duration? relatedTimestamp, int? relatedIndex})
Creates a detailed evaluation result.
const
EvaluationResult.failure(String reason, {Duration? relatedTimestamp, int? relatedIndex})
Creates a failure evaluation result (holds is false). Requires a reason explaining the failure. Optionally includes relatedTimestamp and relatedIndex for context.
const
EvaluationResult.success()
Creates a successful evaluation result (holds is true). Provides minimal information, suitable when only success/failure matters.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
holds bool
true if the formula holds for the trace (or sub-trace beginning at the evaluated start index), false otherwise.
final
reason String?
An optional human-readable explanation for the evaluation outcome.
final
relatedIndex int?
The index within the trace's event list that is most relevant to this result.
final
relatedTimestamp Duration?
The timestamp within the trace that is most relevant to this result.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
Provides a concise string representation of the result. Includes the reason and location (time/index) if available. Example: EvaluationResult(holds: false: Always failed: Operand failed at 150ms)
override

Operators

operator ==(Object other) bool
The equality operator.
inherited