Substitution Transitions | CPN Tools help |
How-to |
Creating large, intricate nets can be a cumbersome task. But similar to modular programming, the construction of CP-nets can be broken into smaller pieces by utilizing the facilities within CPN Tools for creating substitution transitions. Conceptually, nets with substitution transitions are nets with multiple layers of detail - you can have a somewhat simplified net that gives a broad overview of the system you are modelling, and by substituting transitions of this top-level net with more detailed pages, you can bring more and more detail into the model.
There are two ways of creating hierarchical nets. You can create the net "top-down" using the Move to Subpage tool in the Hierarchy tools. Or you can create the net "bottom-up" by creating the pages independently, and linking them together with substitution transitions afterwards.
The Show subpage and Show superpage tools can be used to quickly navigate between pages in a hierarchical CP-net. These tools must be applied to subpage tags and port-type tags, respectively.
After applying these tools, the corresponding page will be either opened in the current binder (if it is not already open), or brought to front (if it is already open in a binder).
The hierarchical relationships between the individual pages of a CP-net are shown in the index entry for the net overview of the net.
Hierarchical relationships are also highlighted using graphical feedback when a cursor is positioned over Hierarchy tags.
The relationship between the sockets on the superpage and the ports on the subpage can be seen by clicking on the triangle in the lower left corner. This will open an index.
If there are sockets that are not yet assigned to a port, then the index will show the possible ports. Clicking on a possibility will make an assignment between the socket and this port. If an unassigned socket cannot be assigned to any port, the leading blue triangle will be hidden and a question mark will follow the name of the socket.
The following example nets contain substitution transitions: Hierarchical Protocol, Telephones, and Ring Protocol.