03.08.2013 Views

PTOLEMY II - CiteSeerX

PTOLEMY II - CiteSeerX

PTOLEMY II - CiteSeerX

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Introduction<br />

1.2. In figure 1.2, the block labeled “Sinewave” at the bottom actually represents an instance of a class,<br />

where the definition of the class is given by the block diagram at the top of figure 1.2. In figure 1.4,<br />

that class definition is extended to create a new subclass definition called “NoisySinewave,” whose<br />

definition is shown at the bottom right of the figure. That subclass “inherits” components (actors) and<br />

connections from the base class. The inherited components are outlined with a dashed outline. It then<br />

overrides the definition by adding a second output port, two more override actors and connections<br />

between these. These additions have no dashed outline.<br />

The NoisySinewave class definition is local to the model at the upper left of figure 1.4. That is, the<br />

class definition is part of the model definition and is available for instantiation and subclassing only<br />

within this model. The class definition is shown visually by an icon that is outlined in light blue to distinguish<br />

it visually from an instance. This contrasts with the Sinewave class definition, which is<br />

defined in its own model file, and is accessible to any model that wishes to use it. Thus, Ptolemy <strong>II</strong><br />

local class definition<br />

instance<br />

instance<br />

inherited<br />

actors<br />

FIGURE 1.4. Illustration of actor-oriented classes, subclasses, and inheritance.<br />

subclass<br />

execution result<br />

override<br />

actors<br />

top-level class definition<br />

8 Ptolemy <strong>II</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!