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
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).
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.
The following example nets contain substitution transitions: Hierarchical Protocol example, Telephone example, and Ring Protocol example.
Nets with unassigned ports should not be simulated. This described in more detail under limitations of hierarchical nets and limitations of simulation.
You must be logged in to post a comment.