Class 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>
  • Field Details

  • Constructor Details

  • Method Details

    • getAllAPs

      public Set<String> getAllAPs(List<List<Character>> abstractValues, List<Character> largest)
    • getRoSISingle

      public RoSI getRoSISingle(net.automatalib.word.Word<List<Double>> signal)
    • getSignalName

      protected abstract String getSignalName()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • constructAtomicStrings

      protected void constructAtomicStrings(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest)
    • getSatisfyingAtomicPropositions

      public Set<String> getSatisfyingAtomicPropositions()
      Description copied from interface: TemporalLogic
      Returns the collection of atomic propositions such that if one of them is satisfied, the formula is satisfied. If there is no such collection, returns null

      Such a set exists if the formula does not contain any temporal operators.

      Specified by:
      getSatisfyingAtomicPropositions in interface TemporalLogic<List<Double>>
    • toAbstractString

      public String toAbstractString()
      Returns a string representation of the formula in the format of LTSMin.
      Specified by:
      toAbstractString in interface TemporalLogic<List<Double>>
      Returns:
      a String object representing the formula in the format of LTSMin.
    • constructSmallerAPs

      private Set<Character> constructSmallerAPs(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest, int index, double threshold)
      Parameters:
      concreteValues - The list of the concrete values of each signal Each element of the list must be sorted in ascending order.
    • constructLargerAPs

      private Set<Character> constructLargerAPs(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest, int index, double threshold)
      Parameters:
      concreteValues - The list of the concrete values of each signal Each element of the list must be sorted in ascending order.
    • constructEqAPs

      private Set<Character> constructEqAPs(List<List<Double>> concreteValues, List<List<Character>> abstractValues, List<Character> largest, int index, double threshold)
      Parameters:
      concreteValues - The list of the concrete values of each signal Each element of the list must be sorted in ascending order.
    • constructAllAPs

      Set<Character> constructAllAPs(List<List<Character>> abstractValues, List<Character> largest, int index)
      Construct the characters that represent the abstract values of the signal.
      Parameters:
      abstractValues - The list of the abstract values of each signal.
      largest - The largest value of each signal. If the signal is output signal this value is used to construct the atomic propositions. If the signal is input signal this value must be empty.
      index - The index of the signal
    • cartesianProductCharacters

      @Nonnull public static Set<String> cartesianProductCharacters(@Nonnull 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

      static <T> org.apache.commons.math3.util.Pair<List<T>,List<Double>> decomposeMap(Map<T,Double> map)
      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.