Package net.maswag.falcaun.temporal
Class AbstractTemporalLogic<I>
java.lang.Object
net.maswag.falcaun.temporal.AbstractTemporalLogic<I>
- Type Parameters:
I- The type of the input at each step.
- All Implemented Interfaces:
Function<IOSignal<I>,,Double> TemporalLogic<I>
- Direct Known Subclasses:
LTLAtomic,STLAbstractAtomic,TemporalAnd,TemporalConst,TemporalImply,TemporalNext,TemporalNot,TemporalOp,TemporalOr,TemporalRelease,TemporalSub,TemporalUntil
Abstract base class for temporal logic formulas.
This class provides a framework for implementing temporal logic formulas, which can be used to specify properties of system behavior over time.
- Author:
- Masaki Waga <masakiwaga@gmail.com>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.maswag.falcaun.temporal.TemporalLogic
TemporalLogic.IOType, TemporalLogic.LTLFormula, TemporalLogic.STLCost -
Field Summary
FieldsModifier and TypeFieldDescription(package private) booleanIndicates whether the formula has been initialized.(package private) TemporalLogic.IOTypeThe type of input/output (I/O) that the formula is concerned with, eitherTemporalLogic.IOType.INPUTorTemporalLogic.IOType.OUTPUT.protected booleanIndicates whether the formula is non-temporal.A set of atomic propositions such that the formula is satisfied if and only if one of these propositions is satisfied. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for AbstractTemporalLogic. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanReturns the set of atomic propositions such that the formula is satisfied if and only if one of these propositions is satisfied.final inthashCode()protected StringConstructs an abstract string representation of the formula using the strings of atomic propositions.protected String(package private) static StringWraps the given string with parentheses.Returns the syntactic fields of this formula, e.g., the operands and the bounds of a bounded temporal operator.protected abstract Class<?> Returns the class representing the operator of this formula, shared by its STL/LTL-specific subclasses.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.maswag.falcaun.temporal.TemporalLogic
apply, constructSatisfyingAtomicPropositions, getAllAPs, getAllConjunctions, getIOType, getRoSI, isInitialized, isNonTemporal, toAbstractLTLString, toAbstractString, toDisjunctiveForm, toLTLString, toNnf, toOwlString, toString
-
Field Details
-
nonTemporal
protected boolean nonTemporalIndicates whether the formula is non-temporal. -
initialized
boolean initializedIndicates whether the formula has been initialized. -
satisfyingAtomicPropositions
A set of atomic propositions such that the formula is satisfied if and only if one of these propositions is satisfied. This field is null for temporal formulas. -
iOType
TemporalLogic.IOType iOTypeThe type of input/output (I/O) that the formula is concerned with, eitherTemporalLogic.IOType.INPUTorTemporalLogic.IOType.OUTPUT.
-
-
Constructor Details
-
AbstractTemporalLogic
protected AbstractTemporalLogic()Default constructor for AbstractTemporalLogic. Initializes a new instance with default values. Subclasses should call this constructor and then set appropriate values for their specific implementation.
-
-
Method Details
-
equals
Formulas are equal if and only if they have the same
structuralKind()and equalstructuralFields(). This is syntactic equality, not logical equivalence: e.g.,p && qandq && pare different. The STL/LTL-specific subclasses do not take part in equality, e.g., a genericTemporalGloballyequals anSTLGloballywith an equal operand. Derived state, caches, and the abstraction configuration (e.g., the mappers ofSTLAbstractAtomic) are ignored, so a cache depending on the configuration must include it in its key separately. -
hashCode
public final int hashCode()The hash code is deterministic across executions.
-
structuralKind
Returns the class representing the operator of this formula, shared by its STL/LTL-specific subclasses.- Returns:
- the class representing the operator of this formula, e.g.,
TemporalGlobally.class
-
structuralFields
Returns the syntactic fields of this formula, e.g., the operands and the bounds of a bounded temporal operator. Derived state, caches, and the abstraction configuration must not be included. Each element must have a deterministic hash code, e.g., an enum constant must be represented by itsEnum.name().- Returns:
- the syntactic fields of this formula in a fixed order
-
parenthesize
Wraps the given string with parentheses.- Parameters:
s- the string to wrap- Returns:
"( " + s + " )"
-
makeAbstractStringWithAtomicStrings
Constructs an abstract string representation of the formula using the strings of atomic propositions. This method is meaningful only for non-temporal formulas that contain constraints on either inputs or outputs.- Returns:
- The abstract string representation of the formula.
- Throws:
IllegalStateException- If the formula is not initialized when this method is called.
-
makeAbstractStringWithAtomicStrings
-
getSatisfyingAtomicPropositions
Returns the set of atomic propositions such that the formula is satisfied if and only if one of these propositions is satisfied. For temporal formulas, this method returnsnullbecause no such set exists.- Specified by:
getSatisfyingAtomicPropositionsin interfaceTemporalLogic<I>- Returns:
- The set of satisfying atomic propositions, or
nullif the formula is temporal.
-