### List color sets

A variable-length color set. The values are a sequence whose color set must be the same type. Declaration syntax colset name = list name0 [with int-exp1..int-exp2]; Order lexicographic (with respect to ordering of base color set) Values [v1, v2, …, vn] where vi has type name0 for i=1..n. Optional with clause The with clause specifies the minimum and maximum length of the lists. Declaration examples […]

### Large Integer color sets

NOTE: This type is introduced in CPN Tools 3.5.5. Large Integers are numerals without a decimal point and no upper limit. The large integer color set is large unless restricted by the with clause, in which case it is small. Declaration syntax colset name = intinf [with int-exp1..int-exp2]; Order usual ordering of integers Optional with clause Restricts the integer color set to an interval determined […]

### Integer color sets

Integers are numerals without a decimal point. The integer color set is large unless restricted by the with clause, in which case it is small.  Declaration syntax colset name = int [with int-exp1..int-exp2]; Order usual ordering of integers Optional with clause Restricts the integer color set to an interval determined by the two expressions in int-exp1 and int-exp2. It must be the case that int-exp1<=int-exp2. […]

### Index color sets

Indexed values are sequences of values comprised of an identifier and an index-specifier. The color set is small. Declaration syntax colset name = index id with int-exp1..int-exp2; Order usual ordering on the indexes Values id i id(i) where i is an integer and int-exp1 <= i <= int-exp2. Declaration examples colset PH = index ph with 1..5; Index color sets are used in the Dining […]

### Definition of list functions

fun mem [] a = false | mem (x::xs) a = a=x orelse mem xs a fun remdupl [] = [] | remdupl [x] = [x] | remdupl (x::xs) = if mem xs x then remdupl xs else x::(remdupl xs) fun rm a [] = [] | rm a (x::xs) = if a=x then xs else x::(rm a xs) fun rmall a [] = [] […]

### Enumerated color sets

Enumerated values are explicitly named as identifiers in the declaration. These values must be alphanumeric identifiers. This is a small color set. Declaration syntax colset name = with id0 | id1 | … | idn; Order as in the declaration Declaration examples colset Day = with Mon | Tues | Wed | Thurs | Fri | Sat | Sun ; Operations See color set functions. […]

### Declare clause

In versions 0.1.1 to 0.1.53 of CPN Tools it is necessary to use the declare clause to generate some of the color set functions. The declare clause can be appended to declarations for enumerated color sets, product color sets, record color sets, and union color sets. Many of the versions between 0.1.1 and 0.1.53 are available only as internal releases. The declare clause does NOT […]

### Color set functions

A number of functions are predefined for some or all color sets. In the following, we assume that the color set cs has been declared. If cs is a timed color set, then the functions below can be used for the untimed version of the color set. Functions for the timed version of the color set are described on the help page for Timed color […]

### Boolean color set

The Boolean values are true and false. Declaration syntax colset name = bool [with (new_false, new_true)]; Order false before true Optional with clause Renames the values; that is, defines the identifiers representing true and false. The new value names must be identifiers. Declaration examples colset B = bool; colset Answer = bool with (no, yes); Boolean operations not b: negation of the Boolean value b […]

### Alias color sets

An alias color set has exactly the same values and properties as a previously declared color set. Declaration syntax colset name = name0; Order ordering of the base color set Declaration examples colset WholeNumber = INT; colset DayOff = Weekend;