Record colour sets
|
CPN Tools help
|
|
CPN ML
|
A fixed-length colour set whose set of values is identical to the cartesian product of the values in previously declared colour sets. Each of the component colour sets may be a different type and each is identified by a unique label so that each field is position-independent.
Declaration Syntax
colset name = record id1:name1 * id2:name2 * ... * idn:namen;
Order
lexicographic (with respect to ordering of base colour sets)
Values
{id1=v1, id2=v2, ..., idn=vn}
Declaration Examples
colset PACK = record se:SITES * re:SITES * no:INT;
A record colour set is used in the example CP-net for the Ring Protocol.
Operations
#idi rec |
extract the idi element from the record rec |
... |
omit field in record (not allowed in CPN inscriptions) |
See also colour set functions.
All Colour Sets
- Simple colour sets:
unit,
boolean,
integer,
string,
enumerated,
index.
- Compound colour sets:
product,
record,
list,
union,
subset,
alias.