AtomicProposition<T> class
final
Represents an atomic proposition, a basic condition evaluated on a state.
This is the simplest form of formula. It holds a predicate function
that takes a state of type T
and returns true
if the proposition holds
for that state, and false
otherwise.
Example:
// Checks if an integer state is greater than 10.
final isGreaterThan10 = AtomicProposition<int>((state) => state > 10);
The optional name provides a human-readable identifier for the proposition,
used in toString()
and potentially in evaluation results.
Constructors
- AtomicProposition.new(bool predicate(T state), {String? name})
-
Creates an atomic proposition with a given
predicate
and optionalname
.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String?
-
A descriptive name for the proposition (optional, used for
toString
).final - predicate → bool Function(T state)
-
The condition to evaluate on a state.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
always(
) → Always< T> -
Creates an ALWAYS (Globally) operator for this formula.
G(this)
inherited -
and(
Formula< T> formula) → And<T> -
Creates a logical conjunction (AND) with another
formula
.this && formula
inherited -
eventually(
) → Eventually< T> -
Creates an EVENTUALLY (Finally) operator for this formula.
F(this)
inherited -
implies(
Formula< T> formula) → Implies<T> -
Creates a logical implication (IMPLIES) with another
formula
.this -> formula
inherited -
next(
) → Next< T> -
Creates a NEXT operator for this formula.
X(this)
inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
not(
) → Not< T> -
Creates a logical negation (NOT) of this formula.
!this
inherited -
or(
Formula< T> formula) → Or<T> -
Creates a logical disjunction (OR) with another
formula
.this || formula
inherited -
release(
Formula< T> formula) → Release<T> -
Creates a RELEASE operator with another
formula
.this R formula
inherited -
toString(
) → String -
Returns a string representation of the formula, useful for debugging.
override
-
until(
Formula< T> formula) → Until<T> -
Creates an UNTIL operator with another
formula
.this U formula
inherited -
weakUntil(
Formula< T> formula) → WeakUntil<T> -
Creates a WEAK UNTIL operator with another
formula
.this W formula
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited