Interface SUL<I,O>

Type Parameters:
I - input symbols
O - output symbols
All Known Subinterfaces:
ObservableSUL<S,I,O>, StateLocalInputSUL<I,O>, TimedSUL<I,O>
All Known Implementing Classes:
AbstractContextExecutableInputSUL, ContextExecutableInputSUL, CounterObservableSUL, CounterStateLocalInputSUL, CounterSUL, CounterTimedSUL, ExecutableInputSUL, MappedSUL, MealySimulatorSUL, MMLTSimulatorSUL, ObservableMealySimulatorSUL, SimplePOJOTestDriver, StateLocalInputMealySimulatorSUL, StateLocalInputSULCache, SULCache, ThreadSafeStateLocalInputSULCache, ThreadSafeSULCache, TimedSULTreeCache, TimeoutReducerSUL

public interface SUL<I,O>
Interface for a system under learning (SUL) that can make single steps.
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    Returns whether this SUL is capable of forking.
    default SUL<I,O>
    Forks this SUL, if possible.
    void
    shut down SUL.
    void
    pre()
    setup SUL.
    step(I in)
    make one step on the SUL.
  • Method Details

    • pre

      void pre()
      setup SUL.
    • post

      void post()
      shut down SUL.
    • step

      O step(I in)
      make one step on the SUL.
      Parameters:
      in - input to the SUL
      Returns:
      output of SUL
      Throws:
      SULException - if the input symbol cannot be executed on the SUL
    • canFork

      default boolean canFork()
      Returns whether this SUL is capable of forking.
      Returns:
      true if this SUL can be forked, false otherwise
      See Also:
    • fork

      default SUL<I,O> fork()
      Forks this SUL, if possible. The fork of a SUL is a copy which behaves exactly the same as this SUL. This method should always return a reset SUL, regardless of whether this call is made between a call to pre() and post().

      If canFork() returns true, this method must return a non-null object, which should behave exactly like this SUL (in particular, it must be forkable as well). Otherwise, a UnsupportedOperationException must be thrown.

      Implementation note: if resetting a SUL changes the internal state of this object in a non-trivial way (e.g., incrementing a counter to ensure independent sessions), care must be taken that forks of this SUL manipulate the same internal state.

      Returns:
      a fork of this SUL.
      Throws:
      UnsupportedOperationException - if this SUL can't be forked.