jInfer

cz.cuni.mff.ksi.jinfer.twostep.processing.automatonmergingstate.regexping.stateremoval.ordered
Class StateRemovalOrdered<T>

java.lang.Object
  extended by cz.cuni.mff.ksi.jinfer.twostep.processing.automatonmergingstate.regexping.stateremoval.ordered.StateRemovalOrdered<T>
All Implemented Interfaces:
RegexpAutomatonSimplifier<T>

public class StateRemovalOrdered<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.


Constructor Summary
StateRemovalOrdered(OrdererFactory ordererFactory)
          Create given factory of Orderer submodule.
 
Method Summary
 Regexp<T> simplify(RegexpAutomaton<T> inputAutomaton, SymbolToString<Regexp<T>> symbolToString)
          Convert input RegexpAutomaton to Regexp which represents same language.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StateRemovalOrdered

public StateRemovalOrdered(OrdererFactory ordererFactory)
Create given factory of Orderer submodule.

Parameters:
ordererFactory - factory of Orderer submodule.
Method Detail

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

jInfer

Generated on Fri Dec 9 00:01:25 CET 2011