Package de.learnlib.filter.cache.moore
Class ThreadSafeMooreCaches
- java.lang.Object
-
- de.learnlib.filter.cache.moore.ThreadSafeMooreCaches
-
public final class ThreadSafeMooreCaches extends Object
A factory for creating thread-safe caches forMooreMachine
-basedMembershipOracle
s. Parameters and return types are tailored towards the use withParallelOracleBuilders
.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <I,O>
Collection<ThreadSafeMooreCacheOracle<I,O>>createDAGCache(Alphabet<I> alphabet, @Nullable Mapping<? super O,? extends O> errorSyms, Collection<? extends MembershipOracle<I,Word<O>>> oracles)
Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.static <I,O>
Supplier<ThreadSafeMooreCacheOracle<I,O>>createDAGCache(Alphabet<I> alphabet, @Nullable Mapping<? super O,? extends O> errorSyms, Supplier<? extends MembershipOracle<I,Word<O>>> oracleSupplier)
Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.static <I,O>
Collection<ThreadSafeMooreCacheOracle<I,O>>createDAGCache(Alphabet<I> alphabet, Collection<? extends MembershipOracle<I,Word<O>>> oracles)
Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.static <I,O>
Supplier<ThreadSafeMooreCacheOracle<I,O>>createDAGCache(Alphabet<I> alphabet, Supplier<? extends MembershipOracle<I,Word<O>>> oracleSupplier)
Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.static <I,O>
Collection<ThreadSafeMooreCacheOracle<I,O>>createTreeCache(Alphabet<I> alphabet, @Nullable Mapping<? super O,? extends O> errorSyms, Collection<? extends MembershipOracle<I,Word<O>>> oracles)
Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.static <I,O>
Supplier<ThreadSafeMooreCacheOracle<I,O>>createTreeCache(Alphabet<I> alphabet, @Nullable Mapping<? super O,? extends O> errorSyms, Supplier<? extends MembershipOracle<I,Word<O>>> oracleSupplier)
Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.static <I,O>
Collection<ThreadSafeMooreCacheOracle<I,O>>createTreeCache(Alphabet<I> alphabet, Collection<? extends MembershipOracle<I,Word<O>>> oracles)
Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.static <I,O>
Supplier<ThreadSafeMooreCacheOracle<I,O>>createTreeCache(Alphabet<I> alphabet, Supplier<? extends MembershipOracle<I,Word<O>>> oracleSupplier)
Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.
-
-
-
Method Detail
-
createDAGCache
public static <I,O> Supplier<ThreadSafeMooreCacheOracle<I,O>> createDAGCache(Alphabet<I> alphabet, Supplier<? extends MembershipOracle<I,Word<O>>> oracleSupplier)
Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
alphabet
- the alphabet containing the symbols of possible queriesoracleSupplier
- the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.- Returns:
- a supplier for
ThreadSafeMooreCacheOracle
s. - See Also:
IncrementalMooreDAGBuilder
-
createDAGCache
public static <I,O> Supplier<ThreadSafeMooreCacheOracle<I,O>> createDAGCache(Alphabet<I> alphabet, @Nullable Mapping<? super O,? extends O> errorSyms, Supplier<? extends MembershipOracle<I,Word<O>>> oracleSupplier)
Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
alphabet
- the alphabet containing the symbols of possible querieserrorSyms
- a mapping for defining a prefix-closure filter. If an output symbol has a non-null mapping all symbols after this symbol are replaced by the mapped value.oracleSupplier
- the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.- Returns:
- a supplier for
ThreadSafeMooreCacheOracle
s. - See Also:
IncrementalMooreDAGBuilder
-
createDAGCache
public static <I,O> Collection<ThreadSafeMooreCacheOracle<I,O>> createDAGCache(Alphabet<I> alphabet, Collection<? extends MembershipOracle<I,Word<O>>> oracles)
Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
alphabet
- the alphabet containing the symbols of possible queriesoracles
- 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
ThreadSafeMooreCacheOracle
s. - See Also:
IncrementalMooreDAGBuilder
-
createDAGCache
public static <I,O> Collection<ThreadSafeMooreCacheOracle<I,O>> createDAGCache(Alphabet<I> alphabet, @Nullable Mapping<? super O,? extends O> errorSyms, Collection<? extends MembershipOracle<I,Word<O>>> oracles)
Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
alphabet
- the alphabet containing the symbols of possible querieserrorSyms
- a mapping for defining a prefix-closure filter. If an output symbol has a non-null mapping all symbols after this symbol are replaced by the mapped value.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
ThreadSafeMooreCacheOracle
s. - See Also:
IncrementalMooreDAGBuilder
-
createTreeCache
public static <I,O> Supplier<ThreadSafeMooreCacheOracle<I,O>> createTreeCache(Alphabet<I> alphabet, Supplier<? extends MembershipOracle<I,Word<O>>> oracleSupplier)
Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
alphabet
- the alphabet containing the symbols of possible queriesoracleSupplier
- the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.- Returns:
- a supplier for
ThreadSafeMooreCacheOracle
s. - See Also:
IncrementalMooreTreeBuilder
-
createTreeCache
public static <I,O> Supplier<ThreadSafeMooreCacheOracle<I,O>> createTreeCache(Alphabet<I> alphabet, @Nullable Mapping<? super O,? extends O> errorSyms, Supplier<? extends MembershipOracle<I,Word<O>>> oracleSupplier)
Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
alphabet
- the alphabet containing the symbols of possible querieserrorSyms
- a mapping for defining a prefix-closure filter. If an output symbol has a non-null mapping all symbols after this symbol are replaced by the mapped value.oracleSupplier
- the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.- Returns:
- a supplier for
ThreadSafeMooreCacheOracle
s. - See Also:
IncrementalMooreTreeBuilder
-
createTreeCache
public static <I,O> Collection<ThreadSafeMooreCacheOracle<I,O>> createTreeCache(Alphabet<I> alphabet, Collection<? extends MembershipOracle<I,Word<O>>> oracles)
Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
alphabet
- the alphabet containing the symbols of possible queriesoracles
- 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
ThreadSafeMooreCacheOracle
s. - See Also:
IncrementalMooreTreeBuilder
-
createTreeCache
public static <I,O> Collection<ThreadSafeMooreCacheOracle<I,O>> createTreeCache(Alphabet<I> alphabet, @Nullable Mapping<? super O,? extends O> errorSyms, Collection<? extends MembershipOracle<I,Word<O>>> oracles)
Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
alphabet
- the alphabet containing the symbols of possible querieserrorSyms
- a mapping for defining a prefix-closure filter. If an output symbol has a non-null mapping all symbols after this symbol are replaced by the mapped value.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
ThreadSafeMooreCacheOracle
s. - See Also:
IncrementalMooreTreeBuilder
-
-