cz.cuni.mff.ksi.jinfer.twostep.processing.automatonmergingstate.regexping.stateremoval.heuristic
Class StateRemovalHeuristic<T>
java.lang.Object
cz.cuni.mff.ksi.jinfer.twostep.processing.automatonmergingstate.regexping.stateremoval.heuristic.StateRemovalHeuristic<T>
- All Implemented Interfaces:
- RegexpAutomatonSimplifier<T>
public class StateRemovalHeuristic<T>
- extends Object
- implements RegexpAutomatonSimplifier<T>
Worker class of state removal algorithm.
Removing states and combining regexps on transitions properly leads to
automaton with only 2 states and one transition. Final regexp is on that transition.
Uses RegexpAutomatonStateRemoval
automaton implementation of automaton, to
which it supplies states to remove in "correct" order. The order matters -
regexp can be shorter or longer (and complicated) according to order of states selected.
Order is determined by implementation of submodule interface
Orderer
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StateRemovalHeuristic
public StateRemovalHeuristic(RegexpEvaluatorFactory rEvalFactory)
simplify
public Regexp<T> simplify(RegexpAutomaton<T> inputAutomaton,
SymbolToString<Regexp<T>> symbolToString)
throws InterruptedException
- Description copied from interface:
RegexpAutomatonSimplifier
- Convert input
RegexpAutomaton
to Regexp
which represents same
language.
- Specified by:
simplify
in interface RegexpAutomatonSimplifier<T>
- Parameters:
inputAutomaton
- automaton to convert on regexp.symbolToString
- converter of type T to string representation (for presenting automaton to user)
- Returns:
- regular expression that represents same language as input automaton accepted
- Throws:
InterruptedException
Generated on Fri Dec 9 00:01:25 CET 2011