Guards | CPN Tools help |
CPN ML |
true
or false
.
Before a guard has been added, the default text for the inscription is []
.
[b-exp1, b-exp2, ..., b-expn]
Guards are also used to restrict values of output arc inscription variables, based on the values of the input arc inscription variables.= <> <= >= < > andalso orelse
Variables that are not found in input arc inscriptions can, in some cases, be bound in the guard.
In this example, the variable i
is not on any input arcs, but it is bound to the value of the variable j
in the guard.
In some cases, it is not possible to bind variables from large colour sets in guards. In this example, i
is a variable of an integer colour set.
use
commands.
time
function
random
function.
true
or false
. Thus the following example is legal because each variable binding is either true or not true:
The following example is not legal because the[if a=3 then b=4 else c=5]
then
and else
clauses evaluate to integers:
[if a=3 then 4 else 5]
The following example nets contain guards: Resource Allocation.