Class ThreadSafeDFACaches

    • Method Detail

      • createCache

        public static <I> Supplier<ThreadSafeDFACacheOracle<I>> createCache​(net.automatalib.alphabet.Alphabet<I> alphabet,
                                                                            Supplier<? extends MembershipOracle<I,​Boolean>> oracleSupplier)
        Enhances a given oracle supplier with a shared, thread-safe cache for a DFA learning setup.

        Note that this method does not specify the implementation to use for the cache. Currently, a DAG (createDAGCache(Alphabet, Supplier)) is used; however, this may change in the future.

        Type Parameters:
        I - input symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        oracleSupplier - the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.
        Returns:
        a supplier for ThreadSafeDFACacheOracles.
      • createCache

        public static <I> Collection<ThreadSafeDFACacheOracle<I>> createCache​(net.automatalib.alphabet.Alphabet<I> alphabet,
                                                                              Collection<? extends MembershipOracle<I,​Boolean>> oracles)
        Enhances each oracle of a given collection with a shared, thread-safe cache for a DFA learning setup.

        Note that this method does not specify the implementation to use for the cache. Currently, a DAG (createDAGCache(Alphabet, Collection)) is used; however, this may change in the future.

        Type Parameters:
        I - input symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        oracles - the collection of oracles which will be used as delegates (in case of a cache-miss) by the corresponding oracles caches.
        Returns:
        a collection of ThreadSafeDFACacheOracles.
      • createDAGCache

        public static <I> Supplier<ThreadSafeDFACacheOracle<I>> createDAGCache​(net.automatalib.alphabet.Alphabet<I> alphabet,
                                                                               Supplier<? extends MembershipOracle<I,​Boolean>> oracleSupplier)
        Enhances a given oracle supplier with a shared, thread-safe cache for a DFA learning setup, using a DAG for internal cache organization.
        Type Parameters:
        I - input symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        oracleSupplier - the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.
        Returns:
        a supplier for ThreadSafeDFACacheOracles.
        See Also:
        IncrementalDFADAGBuilder
      • createDAGCache

        public static <I> Collection<ThreadSafeDFACacheOracle<I>> createDAGCache​(net.automatalib.alphabet.Alphabet<I> alphabet,
                                                                                 Collection<? extends MembershipOracle<I,​Boolean>> oracles)
        Enhances each oracle of a given collection with a shared, thread-safe cache for a DFA learning setup, using a DAG for internal cache organization.
        Type Parameters:
        I - input symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        oracles - the collection of oracles which will be used as delegates (in case of a cache-miss) by the corresponding oracles caches.
        Returns:
        a collection of ThreadSafeDFACacheOracles.
        See Also:
        IncrementalDFADAGBuilder
      • createTreeCache

        public static <I> Supplier<ThreadSafeDFACacheOracle<I>> createTreeCache​(net.automatalib.alphabet.Alphabet<I> alphabet,
                                                                                Supplier<? extends MembershipOracle<I,​Boolean>> oracleSupplier)
        Enhances a given oracle supplier with a shared, thread-safe cache for a DFA learning setup, using a tree for internal cache organization.
        Type Parameters:
        I - input symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        oracleSupplier - the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.
        Returns:
        a supplier for ThreadSafeDFACacheOracles.
        See Also:
        IncrementalDFATreeBuilder
      • createTreeCache

        public static <I> Collection<ThreadSafeDFACacheOracle<I>> createTreeCache​(net.automatalib.alphabet.Alphabet<I> alphabet,
                                                                                  Collection<? extends MembershipOracle<I,​Boolean>> oracles)
        Enhances each oracle of a given collection with a shared, thread-safe cache for a DFA learning setup, using a tree for internal cache organization.
        Type Parameters:
        I - input symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        oracles - the collection of oracles which will be used as delegates (in case of a cache-miss) by the corresponding oracles caches.
        Returns:
        a collection of ThreadSafeDFACacheOracles.
        See Also:
        IncrementalDFATreeBuilder