Creating large, intricate nets can be a cumbersome task. But similar to modular programming, the construction of CPNs 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 modeling, and by substituting transitions of this top-level net with more detailed pages, you can bring more and more detail into the model.
Creating substitution transitions
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 afterward.
- Top-down development – using the Move to Subpage tool.
- Bottom-up development – using the Set port type, Set subpage, and Assign port-socket tools.
Navigating between sub- and superpages
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).
Overview of sub- and superpage relationships
The hierarchical relationships between the individual pages of a CPN 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.
Overview of port/socket assignments
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.