Places, transitions, and pages in CP-nets have names. These names are (possibly empty) strings of characters. Names are simply labels that are used to identify objects. Names do not influence the semantics of CP-nets, and, in general, names of these kinds of objects do not have to be unique. However when using the state space tool, there are a number of syntax restrictions for names.
Monitors also have names. These names are non-empty strings of characters. The names of monitors are used to identify the monitors, they are used when generating code for the monitors, and they may be used for other purposes, such as for file names. There are a number of syntax restrictions for monitor names.
In the following, we will differentiate between name inscriptions and ML names.
A name inscription is a user-defined text string, and it can contain any sequence of characters, including letters, numbers, punctuation, and white space. Name inscriptions are shown in the GUI, and they are saved when you Save a net. There are four kinds of name inscriptions: place name inscriptions, transition name inscriptions, page name inscriptions, and monitor name inscriptions. In the example below, there are 5 name inscriptions.
An ML name is a text string that is obtained from a name inscription according to a method described below. During syntax checking the GUI converts name inscriptions to ML names which are used in the simulator and state space tool. The ML names of the objects in the figure above are: “Top_page”, “p1”, “t1”, “place” and “trans”. An ML name is either an empty string or a CPN ML identifier. ML names must be CPN ML identifier because they are used as function and structure names when code is generated when you enter the state space tool.
A name inscription is converted to an ML name using the following method:
The following criteria must be met in order to Enter the state space tool:
Note that a place and a transition on the same page may have the same ML name.
The following criteria must be met when monitoring a CP-net:
If two places or transitions have the same ML name, then there will be a dark red halo on one of the nodes indicating a naming conflict.
In this example, the ML name of the two places is “Send”. If the hyphen is removed from each of the name inscriptions, then the ML names of the places will be “Send_Msg” and “Send_Ack”.