Illegal Tokens | CPN Tools help |
Illegal tokens may be generated when transitions occur | Errors and Bugs |
with
clause
with
clause
with
clause
When an illegal token is added to a place during a simulation, an error message indicates that a problem has occurred.
A guard can be used to ensure that illegal tokens are not added to places. For example, the colour set function legal
can be used to check that the colours of the added tokens are legal.
P
when transition T
occurs with the binding <i=5>
. The colour set of place P
consists of the integers in the interval [1, 5]. An error occurs when a token with illegal colour 6
is added to place P
, since 6 is not an element of the colour set of the place.
Here a guard is used to ensure that only tokens with legal colours will be added to place P
.