Module sm :: Class Sequence
[frames] | no frames]

Class Sequence

SM --+
     |
    Sequence

Given a list of state machines, make a new machine that will execute the first until it is done, then execute the second, etc. Assume they all have the same input space.

Instance Methods
 
__init__(self, smList, name=None)
 
startState(self)
By default, startState is none
 
advanceIfDone(self, counter, smState)
Internal use only.
 
getNextValues(self, state, inp)
Default version of this method.
 
done(self, state)
By default, machines don't terminate
 
printDebugInfo(self, depth, state, nextState, inp, out, debugParams)
Default method for printing out all of the debugging information for a primitive machine.

Inherited from SM: check, doTraceTasks, getStartState, guaranteeName, isDone, run, start, step, transduce, transduceF

Class Variables

Inherited from SM: legalInputs, name

Instance Variables

Inherited from SM: state

Method Details

__init__(self, smList, name=None)
(Constructor)

 
Parameters:
  • smList - List of terminating SM

startState(self)

 

By default, startState is none

Overrides: startState

advanceIfDone(self, counter, smState)

 

Internal use only. If that machine is done, start new machines until we get to one that isn't done

getNextValues(self, state, inp)

 

Default version of this method. If a subclass only defines getNextState, then we assume that the output of the machine is the same as its next state.

Overrides: SM.getNextValues
(inherited documentation)

done(self, state)

 

By default, machines don't terminate

Overrides: SM.done
(inherited documentation)

printDebugInfo(self, depth, state, nextState, inp, out, debugParams)

 

Default method for printing out all of the debugging information for a primitive machine.

Overrides: SM.printDebugInfo
(inherited documentation)