Package net.maswag.falcaun.parser
Class STLAbstractAtomic
java.lang.Object
net.maswag.falcaun.parser.AbstractTemporalLogic<List<Double>>
net.maswag.falcaun.parser.STLAbstractAtomic
- All Implemented Interfaces:
Function<IOSignal<List<Double>>,,Double> TemporalLogic<List<Double>>,TemporalLogic.STLCost
- Direct Known Subclasses:
STLInputAtomic,STLOutputAtomic
public abstract class STLAbstractAtomic
extends AbstractTemporalLogic<List<Double>>
implements TemporalLogic.STLCost
STLAtomic class.
- Author:
- Masaki Waga <masakiwaga@gmail.com>
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.maswag.falcaun.parser.TemporalLogic
TemporalLogic.IOType, TemporalLogic.LTLFormula, TemporalLogic.STLCost -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected doubleprotected STLAbstractAtomic.Operationprotected intFields inherited from class net.maswag.falcaun.parser.AbstractTemporalLogic
initialized, iOType, nonTemporal, satisfyingAtomicPropositions -
Constructor Summary
ConstructorsConstructorDescriptionSTLAbstractAtomic(int sigIndex, STLAbstractAtomic.Operation op, double comparator) Constructor for STLAbstractAtomic. -
Method Summary
Modifier and TypeMethodDescriptioncartesianProductCharacters(@NotNull List<Set<Character>> charList) Take the cartesian product of a list of sets of characters and return a set of strings by concatenating the characters.constructAllAPs(int index) Construct the characters that represent the abstract values of the signal.protected voidconstructAtomicStrings(int signalSize) 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.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.decomposeMap(Map<T, Double> map) Decomposes a map with value Doubles into a pair of lists of keys and Doubles.(package private) static <T> voidDecomposes a list of maps with value Doubles into a list of pair of lists of keys and Doubles.getAllAPs(int signalSize) getRoSISingle(net.automatalib.word.Word<List<Double>> signal) protected abstract StringtoAbstractLTLString(Map<String, String> mapper) Returns a string representation of the formula in the format of LTSMin.toString()Methods 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, constructSatisfyingAtomicPropositions, getAllAPs, getAllConjunctions, getIOType, getRoSI, getSatisfyingAtomicPropositions, isInitialized, isNonTemporal, toDisjunctiveForm, toLTLString, toNnf
-
Field Details
-
op
-
sigIndex
protected int sigIndex -
comparator
protected double comparator -
allAPs
-
-
Constructor Details
-
STLAbstractAtomic
Constructor for STLAbstractAtomic.
- Parameters:
sigIndex- An index of signalsop- The comparison operatorSTLAbstractAtomic.Operationcomparator- The value to compare against
-
-
Method Details
-
getAllAPs
- Parameters:
signalSize- the length of the signal greater than this.sigIndex
-
getRoSISingle
-
getSignalName
-
toString
-
constructAtomicStrings
protected void constructAtomicStrings(int signalSize) - Parameters:
signalSize- the length of the signal
-
toAbstractString
Returns a string representation of the formula in the format of LTSMin.- Specified by:
toAbstractStringin interfaceTemporalLogic<List<Double>>- Returns:
- a
Stringobject representing the formula in the format of LTSMin.
-
toAbstractLTLString
- Specified by:
toAbstractLTLStringin interfaceTemporalLogic<List<Double>>
-
toOwlString
- Specified by:
toOwlStringin interfaceTemporalLogic<List<Double>>
-
constructSmallerAPs
Constructs a set of characters representing atomic propositions that are smaller than the given threshold for the specified signal index.- 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.- 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.- 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.- Parameters:
index- The index of the signal
-
cartesianProductCharacters
@NotNull public static @NotNull Set<String> cartesianProductCharacters(@NotNull @NotNull List<Set<Character>> charList) Take the cartesian product of a list of sets of characters and return a set of strings by concatenating the characters.For example, if the input is [[a, b], [c, d]], the output will be {ac, ad, bc, bd}.
- Parameters:
charList- a list of sets of characters- Returns:
- a set of concatenated character combinations
-
decomposeMap
Decomposes a map with value Doubles into a pair of lists of keys and Doubles.- Type Parameters:
T- the type of the keys- Parameters:
map- a map to Doubles- Returns:
- a pair of lists of keys and Doubles. The first element is a list of keys and the second element is a list of values. The returned lists are sorted in ascending order of the values.
-
decomposeMapList
static <T> void decomposeMapList(List<Map<T, Double>> maps, List<List<T>> keyLists, List<List<Double>> valueLists) Decomposes a list of maps with value Doubles into a list of pair of lists of keys and Doubles.- Type Parameters:
T- the type of the keys- Parameters:
maps- a list of maps to Doubles.keyLists- a list of lists of keys. The contents of this list will be cleared.valueLists- a list of lists of values. The contents of this list will be cleared.
-