public final class PaigeTarjanMinimization extends Object
PaigeTarjan
.
This implementation is specifically tailored towards partial automata by allowing to provide a custom sinkClassification
, which will be used as the on-demand "successor" of undefined transitions. When extracting
information from the PaigeTarjan
datastructure via PaigeTarjanExtractors
, the original automaton is
used to determine the state-transitions from one partition block to another. If the sinkClassification
did
not match the signature of any existing state, no transition will enter the artificial partition block of the sink.
Consequently, this class will always prune unreachable states, because otherwise we might not return a minimal
automaton.
For minimizing complete automata, use HopcroftMinimization
.
PaigeTarjan
,
HopcroftMinimization
Modifier and Type | Method and Description |
---|---|
static <S,I,A extends DFA<S,I> & InputAlphabetHolder<I>> |
minimizeDFA(A dfa)
Minimizes the given DFA.
|
static <I> CompactDFA<I> |
minimizeDFA(DFA<?,I> dfa,
Alphabet<I> alphabet)
Minimizes the given DFA.
|
static <A extends MutableDFA<?,I>,I> |
minimizeDFA(DFA<?,I> dfa,
Alphabet<I> alphabet,
AutomatonCreator<A,I> creator)
Minimizes the given DFA.
|
static <S,I,T,O,A extends MealyMachine<S,I,T,O> & InputAlphabetHolder<I>> |
minimizeMealy(A mealy)
Minimizes the given Mealy machine.
|
static <I,O> CompactMealy<I,O> |
minimizeMealy(MealyMachine<?,I,?,O> mealy,
Alphabet<I> alphabet)
Minimizes the given Mealy machine.
|
static <A extends MutableMealyMachine<?,I,?,O>,I,O> |
minimizeMealy(MealyMachine<?,I,?,O> mealy,
Alphabet<I> alphabet,
AutomatonCreator<A,I> creator)
Minimizes the given Mealy machine.
|
static <I,T,SP,TP,A extends MutableDeterministic<?,I,?,SP,TP>> |
minimizeUniversal(UniversalDeterministicAutomaton<?,I,T,SP,TP> automaton,
Alphabet<I> alphabet,
AutomatonCreator<A,I> creator,
AutomatonInitialPartitioning ap,
Object sinkClassification)
Minimizes the given automaton depending on the given partitioning function.
|
public static <S,I,A extends DFA<S,I> & InputAlphabetHolder<I>> CompactDFA<I> minimizeDFA(A dfa)
CompactDFA
, using the input alphabet
obtained via dfa.getInputAlphabet()
.dfa
- the DFA to minimizepublic static <I> CompactDFA<I> minimizeDFA(DFA<?,I> dfa, Alphabet<I> alphabet)
CompactDFA
.dfa
- the DFA to minimizealphabet
- the input alphabet (this will be the input alphabet of the returned DFA)public static <A extends MutableDFA<?,I>,I> A minimizeDFA(DFA<?,I> dfa, Alphabet<I> alphabet, AutomatonCreator<A,I> creator)
MutableDFA
, constructed by the given
creator
.dfa
- the DFA to minimizealphabet
- the input alphabet (this will be the input alphabet of the returned DFA)creator
- the creator for constructing the automata instance to returnpublic static <S,I,T,O,A extends MealyMachine<S,I,T,O> & InputAlphabetHolder<I>> CompactMealy<I,O> minimizeMealy(A mealy)
CompactMealy
, using the
alphabet obtained via mealy.getInputAlphabet()
.mealy
- the Mealy machine to minimizepublic static <I,O> CompactMealy<I,O> minimizeMealy(MealyMachine<?,I,?,O> mealy, Alphabet<I> alphabet)
CompactMealy
.mealy
- the Mealy machine to minimizealphabet
- the input alphabet (this will be the input alphabet of the resulting Mealy machine)public static <A extends MutableMealyMachine<?,I,?,O>,I,O> A minimizeMealy(MealyMachine<?,I,?,O> mealy, Alphabet<I> alphabet, AutomatonCreator<A,I> creator)
MutableMealyMachine
,
constructed by the given creator
.mealy
- the Mealy machine to minimizealphabet
- the input alphabet (this will be the input alphabet of the resulting Mealy machine)creator
- the creator for constructing the automata instance to returnpublic static <I,T,SP,TP,A extends MutableDeterministic<?,I,?,SP,TP>> A minimizeUniversal(UniversalDeterministicAutomaton<?,I,T,SP,TP> automaton, Alphabet<I> alphabet, AutomatonCreator<A,I> creator, AutomatonInitialPartitioning ap, Object sinkClassification)
sinkClassification
is
used to describe the signature of the sink state ("successor" of undefined transitions) and may introduce a new,
on-thy-fly equivalence class if it doesn't match a signature of any existing state. See the StateSignature
class for creating signatures for existing states.automaton
- the automaton to minimizealphabet
- the input alphabet (this will be the input alphabet of the resulting Mealy machine)creator
- the creator for constructing the automata instance to returnap
- the initial partitioning function, determining how states will be distinguishedsinkClassification
- the classification used when an undefined transition is encounteredcreator
.AutomatonInitialPartitioning
,
StateSignature
Copyright © 2020. All rights reserved.