Syntax checking

Syntax check and color auras

CPN Tools automatically syntax checks your nets as you create them or when you load in a net. You can see by color indications how far the check has gotten. The color indications are shown in the index, underlining the name of the page where the color belongs. If the page is open in a binder, the color is also shown in the page tab at the top of the page, and on the CPN element where the color belongs.

Before syntax check

The orange aura indicates that an element is not currently checked.

CP-net with unchecked elements

When you load a net, the syntax check takes a couple of minutes to complete. During this phase, the elements will change aura from orange to yellow to no aura (or red, if there is an error).

If the orange aura stays, it is probably because either there is something missing or there is an error on a related net element. The following explains when net elements will be checked:

  • A place will be checked when:
  • An arc will be checked when:
  • A transition will be checked when:
    • All of its surrounding places have been checked, and
    • All of its surrounding arcs can be checked
  • A monitor will be checked when
    • All of the places associated with it have been checked, and
    • All of the transitions associated with it have been checked

No syntax check

If your elements keep the orange glow, and you can see no obvious reason (e.g., errors on connected elements or missing inscriptions), the simulator process might be “stuck”. Try changing an inscription on the elements - this should provoke a new syntax check. If this doesn't work, try saving the net, closing it and re-opening. The whole net should now be re-checked.

If nothing happens, it is probably because the simulator process could not be started. Check if you have a process called cpnmld.exe and a process called run.x86-win32.exe. If these processes do not run (they should run when you have started CPN Tools and have opened or created a net), try installing to another location with no spaces or letters except a-z, A-Z (we try to escape the directory names, but may have overlooked something). If installing to another location does not solve your problem, please file a bug report.

During syntax check

A yellow glow indicates that the place/transition/arc/page/monitor/net is currently being checked.

CP-net with elements being checked

How declarations are syntax checked

Declarations are checked starting from the top. If a declaration depends on a later declaration, it will get an error saying the other declaration is not defined.

Declaration depending on later declaration

Declarations with errors are rechecked when a change is made in any declaration.

How monitors are syntax checked

Monitors are checked starting from the top. If a monitor depends on a later monitor, an error message will be added to the monitor.

Dependency error in monitor

Errors in syntax check

A red aura means the element has been checked but had an error. A speech bubble should appear with the exact error message. Elements connected to the element with the error, e.g. transitions connected to a place with errors, are not checked until the error is fixed.

CP-net with error message

For more information about different kinds of errors see:

Other cases

If your elements have no aura, it is because they are checked and found ok. If one or more transitions should be enabled but are not, try using the Rewind tool in the Simulation tools to initialize the simulation.

Dependencies between elements

A blue aura shows dependencies between declarations, inscriptions and other elements.

If you move the cursor over a declaration in the index, all nodes and other elements using that declaration will get a dark blue aura, also shown in the index and page tabs.

Highlighting elements depending on the declaration INTxDATA

If you move the cursor over a monitor name in the index, all nodes that are associated with the monitor will get a dark blue aura, also shown in the index and page tabs.

Highlighting nodes associated with a monitor

If you move the cursor over an inscription on a page, the element it belongs to will get an aqua aura (only shown on the element).

Highlighting the owner of the inscription INTxDATA

If you move the cursor over a place or transition on a page, a dark blue aura is added to all of the declarations that the node depends on, and all of the monitors that are associated with the node.

Highlighting declarations and monitors for a node

If you move the cursor over a hierarchy tag, different relationships will be highlighted. For more information see Hierarchy tags.

Highlighting hierarchical relationships

Related pages