Package net.maswag.falcaun.parser
Class STLInputAtomic
java.lang.Object
net.maswag.falcaun.parser.AbstractTemporalLogic<List<Double>>
net.maswag.falcaun.parser.STLAbstractAtomic
net.maswag.falcaun.parser.STLInputAtomic
- All Implemented Interfaces:
Function<IOSignal<List<Double>>,,Double> TemporalLogic<List<Double>>,TemporalLogic.STLCost
This class represents an atomic formula in STL for input signals.
This class has the functions to construct the atomic propositions,
a set of alphabets representing the input signal,
from the atomic formula and its input mapper.
For example, let an atomic formula be input(0) > 1.0,
the 0-th input mapper be {a: 1.0, b: 2.0, c: 3.0}, and
the set of alphabets of 1st input signal be {'x', 'y'},
then the atomic propositions are {"bx", "by", "cx", "cy"}.
When the 0-th input mapper is {a: 1.0, b: 2.0, c: 3.0},
- Given input(0) < 1.0, the satisfying 0-th alphabets are {'a'}. Note that < (Operation.lt) represents a less-than-or-equal-to operator.
- Given input(0) == 1.5,
getAllAPs()raises aRuntimeException.
- Author:
- Masaki Waga <masakiwaga@gmail.com>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.maswag.falcaun.parser.STLAbstractAtomic
STLAbstractAtomic.OperationNested classes/interfaces inherited from interface net.maswag.falcaun.parser.TemporalLogic
TemporalLogic.IOType, TemporalLogic.LTLFormula, TemporalLogic.STLCost -
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class net.maswag.falcaun.parser.STLAbstractAtomic
allAPs, comparator, op, sigIndexFields inherited from class net.maswag.falcaun.parser.AbstractTemporalLogic
initialized, iOType, nonTemporal, satisfyingAtomicPropositions -
Constructor Summary
ConstructorsConstructorDescriptionSTLInputAtomic(int sigIndex, STLAbstractAtomic.Operation op, double comparator) Constructor for STLInputAtomic. -
Method Summary
Modifier and TypeMethodDescriptionconstructAllAPs(int index) Construct the characters that represent the abstract values of the signal.constructEqAPs(int index, double threshold) Constructs a set of characters representing atomic propositions that are equal to the given threshold for the specified signal index.constructLargerAPs(int index, double threshold) Constructs a set of characters representing atomic propositions that are greater than the given threshold for the specified signal index.voidConstructsAbstractTemporalLogic.satisfyingAtomicPropositionsif not initialized.constructSmallerAPs(int index, double threshold) Constructs a set of characters representing atomic propositions that are smaller than the given threshold for the specified signal index.Returns the collection of atomic propositions under consideration.Evaluate the formula on the given signal and returns the RoSI, i.e., the range of the possible robustness values after concatenating a suffix.protected String(package private) voidsetInputMapper(List<Map<Character, Double>> inputMapper) Gives the input mapper for the atomic formula.private voidtoNnf(boolean negate) Methods inherited from class net.maswag.falcaun.parser.STLAbstractAtomic
cartesianProductCharacters, constructAtomicStrings, decomposeMap, decomposeMapList, getAllAPs, getRoSISingle, toAbstractLTLString, toAbstractString, toOwlString, toStringMethods inherited from class net.maswag.falcaun.parser.AbstractTemporalLogic
equals, getSatisfyingAtomicPropositions, hashCode, makeAbstractStringWithAtomicStrings, makeAbstractStringWithAtomicStringsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.maswag.falcaun.parser.TemporalLogic
apply, getIOType, getSatisfyingAtomicPropositions, isInitialized, isNonTemporal, toLTLString
-
Field Details
-
abstractInputs
-
concreteInputs
-
inputMapper
-
-
Constructor Details
-
STLInputAtomic
Constructor for STLInputAtomic.
Constructs an atomic proposition input(sigIndex) op comparator.- Parameters:
sigIndex- An index of input signalsop- The comparison operatorSTLAbstractAtomic.Operationcomparator- The value to compare against
-
-
Method Details
-
getAllAPs
Returns the collection of atomic propositions under consideration. If this formula contains only the input constraints, the atomic propositions are the input constraints. If this formula contains only the output constraints, the atomic propositions are the output constraints. If this formula contains both input and output constraints, the atomic propositions are one of the input and output constraints.- Returns:
- A set of all atomic propositions in the formula
-
constructSatisfyingAtomicPropositions
public void constructSatisfyingAtomicPropositions()ConstructsAbstractTemporalLogic.satisfyingAtomicPropositionsif not initialized. -
constructSmallerAPs
Constructs a set of characters representing atomic propositions that are smaller than the given threshold for the specified signal index.- Specified by:
constructSmallerAPsin classSTLAbstractAtomic- Parameters:
index- The index of the signal.- Returns:
- A set of characters representing the atomic propositions.
-
constructLargerAPs
Constructs a set of characters representing atomic propositions that are greater than the given threshold for the specified signal index.- Specified by:
constructLargerAPsin classSTLAbstractAtomic- Parameters:
index- The index of the signal.- Returns:
- A set of characters representing the atomic propositions.
-
constructEqAPs
Constructs a set of characters representing atomic propositions that are equal to the given threshold for the specified signal index.- Specified by:
constructEqAPsin classSTLAbstractAtomic- Parameters:
index- The index of the signal.- Returns:
- A set of characters representing the atomic propositions.
-
constructAllAPs
Construct the characters that represent the abstract values of the signal.- Specified by:
constructAllAPsin classSTLAbstractAtomic- Parameters:
index- The index of the signal
-
setInputMaps
private void setInputMaps() -
setInputMapper
Gives the input mapper for the atomic formula. It is required to construct the atomic propositions.- Parameters:
inputMapper- The input mapper to set
-
getRoSI
Evaluate the formula on the given signal and returns the RoSI, i.e., the range of the possible robustness values after concatenating a suffix.- 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.
-
getSignalName
- Specified by:
getSignalNamein classSTLAbstractAtomic
-
toNnf
-
toDisjunctiveForm
-
getAllConjunctions
-