W1006 State Machine Not Parsed
[Previous]  [Next] 
|
User Manual [Previous]  [Next] W1006 State Machine Not ParsedUmple semantic warning reported when a state machine could not be fully parsed and is treated as 'extra code'.In Umple, elements of a class not recognized as valid Umple are assumed to be elements of the target programming language that are embedded in the Umple. However, this warning is raised when the Umple compiler has reason to believe that the developer might have been trying to specify a state machine, because the segment of code starts with something like sm {. Since that sequence is not found in target languages, and since it is easy to make a mistake specifying states, substates, guards, or events, this message is generated. If you encounter this message and indeed intended to specify a state machine, look carefully at the state machine code. The following are some common mistakes and things to check if you get this warning when writing a state machine
If you are still stuck when writing details of a state machine, comment out segments until you can narrow down the problem. Example// This example generates the warning // on line 9 there is a missing semicolon // on line 17 the = should be == // on line 24 the -> should be after the guard // on line 30 there should be an / after entry class X { sm1 { s1 { a -> sb } s2{} } Integer v = 0; sm2 { s3 { e1 [v = 5] -> s4; } s4 {} } sm3 { s5{ e2 -> [v==1] s6; } s6{} } sm4 { s6 { entry {dosomething();} e3 -> s7; } s7 {} } } class X { sm { a -> b b -> c } } Load the above code into UmpleOnline |