and counter max u201d and it guards the state settings u201c open false u201d and u201c counter 0 u201d in other words if a close action is performed and the device is open and the close counter is equal to the predetermined threshold the device is set to the closed state and the counter is reset to zero the guard for the setmax action is the condition u201c true u201d and it guards the state setting u201c counter max u201d the condition u201c true u201d actually specifies the unconditional updating of the close counter to the predetermined threshold value max whenever the setmax action is performed with reference to fig4 and embodiment 300 of a method to generate an fsm from an asm begins at 302 with initial settings of the sets r f and l the method may be applied to generate a data structure representing the fsm in a computer memory as used herein the term u2018 data structure u2019 refers to any collection of related data the set r associates an encoding with one of the fsm states in a manner to be described initially the set r contains an encoding for a selected initial state of the fsm the encoding is determined as follows a bit position is assigned to each guard in the asm if in a particular state a gaurd condition is satisfied e g evaluates true the corresponding bit is set otherwise the corresponding bit is not set consider the asm embodiment of fig2 the guards are in one embodiment guard 1 may be assigned to bit position b0 guard 2.