Journal of Robotics / 2010 / Article / Alg 2

Research Article

An Extensible Dialogue Script for a Robot Based on Unification of State-Transition Models

Algorithm 2

fstate = []
func checkisolatedstate_recur(stateid):
 for command in states(stateid).commands:
       if command.type == statetransition:
      if fstate(command.target) == 0:
     fstate(command.target) = 1
     checkisolatedstate_recur(command.target)
func checkisolatedstate(stateid):
 checkisolatedstate_recur(command.target)
 for state in states:
       if fstate(state) != 1
       detected = 1