Class ReuseOracleBuilder<S,​I,​O>

  • Type Parameters:
    S - system state type
    I - input symbol type
    O - output symbol type

    public final class ReuseOracleBuilder<S,​I,​O>
    extends Object
    A builder for constructing ReuseOracle instances.
    • Constructor Detail

      • ReuseOracleBuilder

        public ReuseOracleBuilder​(net.automatalib.alphabet.Alphabet<I> alphabet,
                                  Supplier<? extends ReuseCapableOracle<S,​I,​O>> oracleSupplier)
        Creates a new builder (and may set default values for some parameters).
        Parameters:
        alphabet - the value used to initialize parameter alphabet
        oracleSupplier - the value used to initialize parameter oracleSupplier
    • Method Detail

      • withAlphabet

        public ReuseOracleBuilder<S,​I,​O> withAlphabet​(net.automatalib.alphabet.Alphabet<I> alphabet)
        Sets the new value for the parameter alphabet and returns this builder instance.
        Parameters:
        alphabet - the new value for the parameter alphabet
        Returns:
        the current builder instance
      • withOracleSupplier

        public ReuseOracleBuilder<S,​I,​O> withOracleSupplier​(Supplier<? extends ReuseCapableOracle<S,​I,​O>> oracleSupplier)
        Sets the new value for the parameter oracleSupplier and returns this builder instance.
        Parameters:
        oracleSupplier - the new value for the parameter oracleSupplier
        Returns:
        the current builder instance
      • withEnabledSystemStateInvalidation

        public ReuseOracleBuilder<S,​I,​O> withEnabledSystemStateInvalidation​(boolean enabledSystemStateInvalidation)
        Sets the new value for the parameter enabledSystemStateInvalidation and returns this builder instance.
        Parameters:
        enabledSystemStateInvalidation - the new value for the parameter enabledSystemStateInvalidation
        Returns:
        the current builder instance
      • withSystemStateHandler

        public ReuseOracleBuilder<S,​I,​O> withSystemStateHandler​(SystemStateHandler<S> systemStateHandler)
        Sets the new value for the parameter systemStateHandler and returns this builder instance.
        Parameters:
        systemStateHandler - the new value for the parameter systemStateHandler
        Returns:
        the current builder instance
      • withInvariantInputs

        public ReuseOracleBuilder<S,​I,​O> withInvariantInputs​(Set<I> invariantInputs)
        Sets the new value for the parameter invariantInputs and returns this builder instance.
        Parameters:
        invariantInputs - the new value for the parameter invariantInputs
        Returns:
        the current builder instance
      • withFailureOutputs

        public ReuseOracleBuilder<S,​I,​O> withFailureOutputs​(Set<O> failureOutputs)
        Sets the new value for the parameter failureOutputs and returns this builder instance.
        Parameters:
        failureOutputs - the new value for the parameter failureOutputs
        Returns:
        the current builder instance
      • withMaxSystemStates

        public ReuseOracleBuilder<S,​I,​O> withMaxSystemStates​(int maxSystemStates)
        Sets the new value for the parameter maxSystemStates and returns this builder instance.
        Parameters:
        maxSystemStates - the new value for the parameter maxSystemStates
        Returns:
        the current builder instance
      • withAccessPolicy

        public ReuseOracleBuilder<S,​I,​O> withAccessPolicy​(BoundedDeque.AccessPolicy accessPolicy)
        Sets the new value for the parameter accessPolicy and returns this builder instance.
        Parameters:
        accessPolicy - the new value for the parameter accessPolicy
        Returns:
        the current builder instance
      • withEvictPolicy

        public ReuseOracleBuilder<S,​I,​O> withEvictPolicy​(BoundedDeque.EvictPolicy evictPolicy)
        Sets the new value for the parameter evictPolicy and returns this builder instance.
        Parameters:
        evictPolicy - the new value for the parameter evictPolicy
        Returns:
        the current builder instance
      • build

        public ReuseOracle<S,​I,​O> build()
        Creates a new ReuseOracle instance with the configured parameters.
        Returns:
        the created instance