Ports and Terminals
This model shows ports and terminals in more detail. This model in
particular clarifies the role of "multi-ports." I have used the
composite attribute to flag a multi-port, as I didn't think
there was sufficient difference to warrant making atomic and
multi-ports into sibling classes.
Notes on the model:
- A MetaIcon has a set of TermStyles qualified by name; each
contains a set of MetaTerms also qualified by name. The idea here is
to allow the icon designer to choose and limit the ways in which ports
can be displayed for an icon. (I wondered whether terminal style
should be specified by the star rather than the icon, but decided that
the icon designer gets to choose (and limit) the terminal styles of
each icon.)
- In addition, a MetaIcon can also contain a set of terminals.
This is mainly for convenience -- it is not compulsory to create a
separate termstyle of none exists -- and gives the set of terminals
that will be used if none is specified when the icon is created.
- MetaStar contains a set of MetaPorts, qualified by name.
Each MetaPort has the datatype it carries, a flag indicating
whether it is a composite port, and a flag indicating whether
those ports are ordered. All of these are reflected in the Port
instances.
- MetaPort and MetaTerm, and Port and Terminal, have one of two
possible associations. Either
- The objects at either end of the association are both composite or
both atomic. In this case, one port maps to exactly one terminal.
- The port end of the association is composite and the terminal end
is atomic. In that case, each port maps to multiple terminals,
qualified by the instance number. This reflects the situation where
connections are made to individual ports within a multiport.
- There is a (necessary) difference between terminal name and
port name. The terminal name will likely be formed by concatenating
the port name and the instance number.
- Each Edge connects to up to two Ports. The connects
association is qualified by the end (for want of a better name)
at which it is connected. end can be either "source" or
"target". The multiplicity at the Port end of the association is zero
or one -- that is, the Edge may not be connected to a Port at
all. This is used to support support editing of partially constructed
graphs. Each connection between a Port and an Edge has an optional
instance attribute -- this is present if the Port is
composite.
- A Net graphically represents an Edge.
Net's are connected to up to two terminals, one at
each end.
JohnR, 14 Oct 97, updated 11/07/97