Package net.maswag.falcaun.temporal
Class LTLAtomic
- All Implemented Interfaces:
Function<IOSignal<String>,,Double> TemporalLogic<String>,TemporalLogic.LTLFormula
The atomic propositions in LTL formulas
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.maswag.falcaun.temporal.TemporalLogic
TemporalLogic.IOType, TemporalLogic.LTLFormula, TemporalLogic.STLCost -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LTLFormulaBaseprivate static final PatternThe keywords of the LTL grammar that matchIDENTIFIERbut are not lexed as identifiers.Fields inherited from class net.maswag.falcaun.temporal.AbstractTemporalLogic
initialized, iOType, nonTemporal, satisfyingAtomicPropositions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCollects all atomic propositions from this formula and its subformulas.void(package private) static StringformatSymbol(String symbol) Returns all atomic propositions from the appropriate set based on the IO type.getAPs()Gets the atomic propositions for this formula.Evaluate the formula on the given signal and returns the RoSI, i.e., the range of the possible robustness values after concatenating a suffix.voidSets the universe of atomic propositions for this formula.Returns the syntactic fields of this formula, e.g., the operands and the bounds of a bounded temporal operator.protected Class<?> Returns the class representing the operator of this formula, shared by its STL/LTL-specific subclasses.toAbstractLTLString(Map<String, String> mapper) Returns a string representation of the formula in the format of LTSMin.toNnf(boolean negate) toString()Returns a human-readable string representation of the formula.Methods inherited from class net.maswag.falcaun.temporal.AbstractTemporalLogic
equals, getSatisfyingAtomicPropositions, hashCode, makeAbstractStringWithAtomicStrings, makeAbstractStringWithAtomicStrings, parenthesizeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.maswag.falcaun.temporal.TemporalLogic
apply, getIOType, getSatisfyingAtomicPropositions, isInitialized, isNonTemporal, toLTLString
-
Field Details
-
formulaBase
-
inputString
-
outputString
-
IDENTIFIER
-
KEYWORDS
The keywords of the LTL grammar that matchIDENTIFIERbut are not lexed as identifiers.
-
-
Constructor Details
-
LTLAtomic
-
-
Method Details
-
setAPs
Sets the universe of atomic propositions for this formula. This is necessary for correctly computing negation.- Specified by:
setAPsin interfaceTemporalLogic.LTLFormula- Parameters:
aps- The atomic propositions containing all possible input and output APs
-
getAPs
Gets the atomic propositions for this formula.- Specified by:
getAPsin interfaceTemporalLogic.LTLFormula- Returns:
- The atomic propositions, or null if not set
-
getAllAPs
Returns all atomic propositions from the appropriate set based on the IO type. Requires that APs have been set via setAPs() before calling this method.- Specified by:
getAllAPsin interfaceTemporalLogic<String>- Returns:
- Set of atomic propositions based on the IO type (input, output, or both)
- Throws:
IllegalStateException- if APs have not been set
-
collectAtomicPropositions
Description copied from interface:TemporalLogic.LTLFormulaCollects all atomic propositions from this formula and its subformulas.- Specified by:
collectAtomicPropositionsin interfaceTemporalLogic.LTLFormula- Parameters:
aps- The atomic propositions to populate
-
constructSatisfyingAtomicPropositions
public void constructSatisfyingAtomicPropositions()- Specified by:
constructSatisfyingAtomicPropositionsin interfaceTemporalLogic<String>
-
toAbstractString
Description copied from interface:TemporalLogicReturns a string representation of the formula in the format of LTSMin.- Specified by:
toAbstractStringin interfaceTemporalLogic<String>- Returns:
- a
Stringobject representing the formula in the format of LTSMin.
-
toString
Returns a human-readable string representation of the formula.The representation is unambiguous only for the formulas supported by the parsers: if a formula is structurally equal to one constructed by
STLFactoryorLTLFactory, its string representation is parsed back to a structurally equal formula. Otherwise, structurally different formulas may have the same string representation, e.g.:- empty or singleton conjunctions and disjunctions,
- n-ary conjunctions and disjunctions, which are parsed back as left-nested binary ones,
- the next operator, whose
nullPositiveflag is not printed, - LTL atomic propositions with both input and output symbols, which are printed like conjunctions,
- LTL symbols outside the grammar and non-finite STL thresholds, which the parsers reject, and
- other formulas outside the grammar, e.g.,
TemporalConst.
Thus, this method must not be used as a substitute for structural equality or as a unique key, e.g., of a cache.
- Specified by:
toStringin interfaceTemporalLogic<String>- Overrides:
toStringin classObject- Returns:
- a human-readable string representation of the formula
-
formatSymbol
- Parameters:
symbol- the symbol to print- Returns:
symbolitself if it is an identifier in the LTL grammar, otherwise a quoted string
-
structuralKind
Returns the class representing the operator of this formula, shared by its STL/LTL-specific subclasses.- Specified by:
structuralKindin classAbstractTemporalLogic<String>- 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().- Specified by:
structuralFieldsin classAbstractTemporalLogic<String>- Returns:
- the syntactic fields of this formula in a fixed order
-
toAbstractLTLString
- Specified by:
toAbstractLTLStringin interfaceTemporalLogic<String>
-
toOwlString
- Specified by:
toOwlStringin interfaceTemporalLogic<String>
-
getRoSI
Description copied from interface:TemporalLogicEvaluate the formula on the given signal and returns the RoSI, i.e., the range of the possible robustness values after concatenating a suffix.- Specified by:
getRoSIin interfaceTemporalLogic<String>- Parameters:
signal- The input-output signal to evaluate the formula on- Returns:
- a
RoSIobject representing the range of the possible robustness values after concatenating a suffix.
-
toNnf
- Specified by:
toNnfin interfaceTemporalLogic<String>
-
toDisjunctiveForm
- Specified by:
toDisjunctiveFormin interfaceTemporalLogic<String>
-
getAllConjunctions
- Specified by:
getAllConjunctionsin interfaceTemporalLogic<String>
-