Subset color sets

Subset color sets

Subsets are a selection of values in a previously declared color set. Declaration syntax The subset specification can take two different forms: function and list. colset name = subset name0 by subset-function; The by clause specifies a function whose return value is a boolean. The color set name will contain exactly those values from name0 that are mapped into the boolean value true. colset name […]

Read Me Leave comment

Real color sets

Real color sets

NOTE: This type is introduced in CPN Tools 3.5.5. Real numbers are distinguished from integers by the decimal point. The period separates the integer part from the fractional part. One or more digits must follow after the decimal point. The real color set is large. IMPORTANT: Reals are NOT equality types in Standard ML. In the CPN ML variant used in CPN Tools this has […]

Read Me Leave comment

Time color sets

Time color sets

NOTE: This type is introduced in CPN Tools 3.5.5. Time values are numerals depending on the . The time color set is large. The type depends on the time mode of the model, and may either be identical to large integer color sets or real color sets Declaration syntax colset name = time Order usual ordering of time stamps Declaration examples colset TME = time; […]

Read Me Leave comment

String color sets

String color sets

Strings are specified by sequences of printable ASCII characters surrounded with double quotes. The string color set is large unless restricted by the with … and clause, in which case it is small. Declaration syntax colset name = string [with string-exp1..string-exp2 [and int-exp1..int-exp2]]; Order lexicographic (with the ASCII ordering) Optional with clause Restricts the character set of string color sets. The character set is specified […]

Read Me Leave comment

Definition of list functions

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 [] = [] […]

Read Me Leave comment

Enumerated color sets

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. […]

Read Me Leave comment

Declare clause

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 […]

Read Me Leave comment

Color set functions

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 […]

Read Me Leave comment

Index color sets

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 […]

Read Me Leave comment

Alias color sets

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;  

Read Me Leave comment