Abstract Finite State Machine
Take a look on Wikipedia state machine description: http://en.wikipedia.org/wiki/Finite_state_machine
Any type of Transducers (Moore machine or Mealy machine) also may be implemented by using this abstract FSM. process() methods invokes a specified actions which may construct FSM output. Actions may be also used to signal, that we have reached Accept State
Located in /Search/Lucene/FSM.php (line 39)
Finite State machine constructor
$states is an array of integers or strings with a list of possible machine states constructor treats fist list element as a sturt state (assignes it to $_current state). It may be reassigned by setState() call. States list may be empty and can be extended later by addState() or addStates() calls.
$inputAphabet is the same as $states, but represents input alphabet it also may be extended later by addInputSymbols() or addInputSymbol() calls.
$rules parameter describes FSM transitions and has a structure: array( array(sourseState, input, targetState[, inputAction]), array(sourseState, input, targetState[, inputAction]), array(sourseState, input, targetState[, inputAction]), ... ) Rules also can be added later by addRules() and addRule() calls.
FSM actions are very flexible and may be defined by addEntryAction(), addExitAction(), addInputAction() and addTransitionAction() calls.
Add state entry action.
Several entry actions are allowed. Action execution order is defined by addEntryAction() calls
Add state exit action.
Several exit actions are allowed. Action execution order is defined by addEntryAction() calls
Add input action (defined by {state, input} pair).
Several input actions are allowed. Action execution order is defined by addInputAction() calls
Add symbol to the input alphabet
Add symbols to the input alphabet
Add symbol to the input alphabet
Add transition rules
array structure: array( array(sourseState, input, targetState[, inputAction]), array(sourseState, input, targetState[, inputAction]), array(sourseState, input, targetState[, inputAction]), ... )
Add state to the state machine
Add states to the state machine
Add transition action (defined by {state, input} pair).
Several transition actions are allowed. Action execution order is defined by addTransitionAction() calls
Get FSM state.
Process an input
Set FSM state.
No any action is invoked
Documentation generated on Mon, 21 Jun 2010 15:25:01 -0400 by phpDocumentor 1.4.3