-
- Type Parameters:
I
- input symbol typeO
- output symbol type
- All Superinterfaces:
SUL<I,O>
- All Known Implementing Classes:
CounterStateLocalInputSUL
,StateLocalInputMealySimulatorSUL
,StateLocalInputSULCache
,ThreadSafeStateLocalInputSULCache
public interface StateLocalInputSUL<I,O> extends SUL<I,O>
A System Under Learning (SUL) which can additionally report the inputs that the SUL can process in its current state, i.e. inputs that will not trigger aSULException
when used in the next invocation of theSUL.step(Object)
method return an otherwise "undefined" behavior.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Collection<I>
currentlyEnabledInputs()
Returns the enabled symbols for the current state of theSUL
.default StateLocalInputSUL<I,O>
fork()
Forks this SUL, if possible.
-
-
-
Method Detail
-
currentlyEnabledInputs
Collection<I> currentlyEnabledInputs()
Returns the enabled symbols for the current state of theSUL
.- Returns:
- the currently enabled inputs
- Throws:
SULException
- if theSUL
cannot provide information about the currently enabled inputs
-
fork
default StateLocalInputSUL<I,O> fork()
Description copied from interface:SUL
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 reseted SUL, regardless of whether this call is made between a call toSUL.pre()
andSUL.post()
.If
SUL.canFork()
returnstrue
, this method must return a non-null
object, which should behave exactly like this SUL (in particular, it must be forkable as well). Otherwise, aUnsupportedOperationException
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.
-
-