|
NAME
SYNTAX
DESCRIPTION
EXAMPLES
proctype A() { L0: if :: cond1 -> goto L1 /* jump to the end of the sequence */ :: else -> skip /* the "-> skip" is redundant here */ fi; ... L1: skip }One is tempted to use also a skip statement after the else guard in the first selection structure above, to indicate that processing is to continue at the control state that immediately follows the selection construct. This is harmless, but redundant. The above selection could be written more tersely as: L0: if :: cond1 -> goto L1 :: else fi;Because Promela is an asynchronous language, the skip is never needed to introduce delay in process executions. In Promela there is by definition an arbitrary, and unknowable, delay in between any two statements in a proctype body. If control reaches a statement, and that statement is and remains executable, the only thing known is that the statement will be executed within a finite period of time. This corresponds to Dijkstra's finite progress assumption for concurrent systems, and it respects the rule that no assumptions may be made about the relative execution speeds of asynchronous processes. The only possible exception to this rule may be to influence the outcome of random simulations by using redundant skip statements. NOTES
The skip short-hand is an equivalent of true , and halt , if it existed, would be the equivalent of false . SEE ALSO
|