Check Initial Transitions - nasa/fpp GitHub Wiki
This algorithm traverses a state machine definition and checks the initial transition specifiers.
- 
A state machine definition smd. 
- 
A state machine analysis data structure sma representing the results of analysis so far. 
If smd has state machine members, then
- 
Check that smd has exactly one initial transition specifier in its members. 
- 
Visit each of the state machine members smm of smd as specified below. 
Visit a state machine member smm as follows:
- 
If smm is an initial transition specifier s, then check that the state definition or choice definition referred to in the enter expression of s leads to a member of the enclosing state machine. 
- 
Otherwise if smm is a state definition d with state definition member sequence sdms and sdms has at least one state definition, then - 
Check that sdms has exactly one initial transition specifier. 
- 
Visit each element sdm of sdms. 
 
- 
- 
Otherwise do nothing. 
Visit a state definition member sdm as follows:
- 
If smm is an initial transition specifier s, then check that the state definition or choice definition referred to in the enter expression of s leads to a member of the enclosing state definition. 
- 
Otherwise if sdm is a state definition, then visit it in the same way as for the corresponding state machine member. 
- 
Otherwise do nothing.