Package de.learnlib.filter.cache.mealy
Class ThreadSafeMealyCaches
- java.lang.Object
-
- de.learnlib.filter.cache.mealy.ThreadSafeMealyCaches
-
public final class ThreadSafeMealyCaches extends Object
A factory for creating thread-safe caches forMealyMachine
-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<ThreadSafeMealyCacheOracle<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 Mealy machine learning setup, using a DAG for internal cache organization.static <I,O>
Supplier<ThreadSafeMealyCacheOracle<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 Mealy machine learning setup, using a DAG for internal cache organization.static <I,O>
Collection<ThreadSafeMealyCacheOracle<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 Mealy machine learning setup, using a DAG for internal cache organization.static <I,O>
Supplier<ThreadSafeMealyCacheOracle<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 Mealy machine learning setup, using a DAG for internal cache organization.static <I,O>
Collection<ThreadSafeMealyCacheOracle<I,O>>createDynamicTreeCache(@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 Mealy machine learning setup, using a dynamically growing tree for internal cache organization.static <I,O>
Supplier<ThreadSafeMealyCacheOracle<I,O>>createDynamicTreeCache(@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 Mealy machine learning setup, using a dynamically growing tree for internal cache organization.static <I,O>
Collection<ThreadSafeMealyCacheOracle<I,O>>createDynamicTreeCache(Collection<? extends MembershipOracle<I,Word<O>>> oracles)
Enhances each oracle of a given collection with a shared, thread-safe cache for a Mealy machine learning setup, using a dynamically growing tree for internal cache organization.static <I,O>
Supplier<ThreadSafeMealyCacheOracle<I,O>>createDynamicTreeCache(Supplier<? extends MembershipOracle<I,Word<O>>> oracleSupplier)
Enhances a given oracle supplier with a shared, thread-safe cache for a Mealy machine learning setup, using a dynamically growing tree for internal cache organization.static <I,O>
Collection<ThreadSafeMealyCacheOracle<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 Mealy machine learning setup, using a tree for internal cache organization.static <I,O>
Supplier<ThreadSafeMealyCacheOracle<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 Mealy machine learning setup, using a tree for internal cache organization.static <I,O>
Collection<ThreadSafeMealyCacheOracle<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 Mealy machine learning setup, using a tree for internal cache organization.static <I,O>
Supplier<ThreadSafeMealyCacheOracle<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 Mealy machine learning setup, using a tree for internal cache organization.
-
-
-
Method Detail
-
createDAGCache
public static <I,O> Supplier<ThreadSafeMealyCacheOracle<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 Mealy 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
ThreadSafeMealyCacheOracle
s. - See Also:
IncrementalMealyDAGBuilder
-
createDAGCache
public static <I,O> Supplier<ThreadSafeMealyCacheOracle<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 Mealy 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
ThreadSafeMealyCacheOracle
s. - See Also:
IncrementalMealyDAGBuilder
-
createDAGCache
public static <I,O> Collection<ThreadSafeMealyCacheOracle<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 Mealy 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
ThreadSafeMealyCacheOracle
s. - See Also:
IncrementalMealyDAGBuilder
-
createDAGCache
public static <I,O> Collection<ThreadSafeMealyCacheOracle<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 Mealy 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
ThreadSafeMealyCacheOracle
s. - See Also:
IncrementalMealyDAGBuilder
-
createTreeCache
public static <I,O> Supplier<ThreadSafeMealyCacheOracle<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 Mealy 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
ThreadSafeMealyCacheOracle
s. - See Also:
IncrementalMealyTreeBuilder
-
createTreeCache
public static <I,O> Supplier<ThreadSafeMealyCacheOracle<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 Mealy 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
ThreadSafeMealyCacheOracle
s. - See Also:
IncrementalMealyTreeBuilder
-
createTreeCache
public static <I,O> Collection<ThreadSafeMealyCacheOracle<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 Mealy 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
ThreadSafeMealyCacheOracle
s. - See Also:
IncrementalMealyTreeBuilder
-
createTreeCache
public static <I,O> Collection<ThreadSafeMealyCacheOracle<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 Mealy 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
ThreadSafeMealyCacheOracle
s. - See Also:
IncrementalMealyTreeBuilder
-
createDynamicTreeCache
public static <I,O> Supplier<ThreadSafeMealyCacheOracle<I,O>> createDynamicTreeCache(Supplier<? extends MembershipOracle<I,Word<O>>> oracleSupplier)
Enhances a given oracle supplier with a shared, thread-safe cache for a Mealy machine learning setup, using a dynamically growing tree for internal cache organization. Rather than index-based storage, this cache usedMap
s. As a result, no alphabet specification is required.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
oracleSupplier
- the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.- Returns:
- a supplier for
ThreadSafeMealyCacheOracle
s. - See Also:
DynamicIncrementalMealyTreeBuilder
-
createDynamicTreeCache
public static <I,O> Supplier<ThreadSafeMealyCacheOracle<I,O>> createDynamicTreeCache(@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 Mealy machine learning setup, using a dynamically growing tree for internal cache organization. Rather than index-based storage, this cache usedMap
s. As a result, no alphabet specification is required.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
errorSyms
- 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
ThreadSafeMealyCacheOracle
s. - See Also:
DynamicIncrementalMealyTreeBuilder
-
createDynamicTreeCache
public static <I,O> Collection<ThreadSafeMealyCacheOracle<I,O>> createDynamicTreeCache(Collection<? extends MembershipOracle<I,Word<O>>> oracles)
Enhances each oracle of a given collection with a shared, thread-safe cache for a Mealy machine learning setup, using a dynamically growing tree for internal cache organization. Rather than index-based storage, this cache usedMap
s. As a result, no alphabet specification is required.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
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
ThreadSafeMealyCacheOracle
s. - See Also:
DynamicIncrementalMealyTreeBuilder
-
createDynamicTreeCache
public static <I,O> Collection<ThreadSafeMealyCacheOracle<I,O>> createDynamicTreeCache(@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 Mealy machine learning setup, using a dynamically growing tree for internal cache organization. Rather than index-based storage, this cache usedMap
s. As a result, no alphabet specification is required.- Type Parameters:
I
- input symbol typeO
- output symbol type- Parameters:
errorSyms
- 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
ThreadSafeMealyCacheOracle
s. - See Also:
DynamicIncrementalMealyTreeBuilder
-
-