03.08.2013 Views

PTOLEMY II - CiteSeerX

PTOLEMY II - CiteSeerX

PTOLEMY II - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

MoML<br />

it cannot collide with the name of any other property in the model.<br />

7.3.13 Input Element<br />

It is possible to insert MoML from another file or URL into a particular point in your model. For<br />

example:<br />

<br />

<br />

<br />

<br />

<br />

This takes the contents of the URL specified in the source attribute of the input element and places<br />

them inside the entity named “a”. The base of the current document (the one containing the import<br />

statement) is used to interpret a relative URL, or if the current document has no base, then the current<br />

working directory is used, or if that fails, the current CLASSPATH.<br />

7.3.14 Annotations for Visual Rendering<br />

The abstract syntax of MoML, clustered graphs, is amenable to visual renditions as bubble and arc<br />

diagrams or as block diagrams. To support tools that display and/or edit MoML files visually, MoML<br />

allows a relation to have multiple vertices that form a path. Links can then be made to individual vertices.<br />

Consider the following example:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

This assumes that there are three entities named A, B, and C. The relation is annotated with a set of<br />

vertices, v1 and v2, which will normally be rendered as graphical objects. The vertices are linked<br />

together with paths, which in a simple visual tool might be straight lines, or in a more sophisticated<br />

tool might be autorouted paths. In the above example, v1 and v2 are linked by a path. The link elements<br />

specify not just a relation, but also a vertex within that relation. This tells the visual rendering<br />

tool to draw a path from the specified port to the specified vertex.<br />

Figure 7.8 illustrates how the above fragment might be rendered. The square boxes are icons for<br />

A B<br />

FIGURE 7.8. Example showing how MoML might be visually rendered.<br />

Heterogeneous Concurrent Modeling and Design 211<br />

C

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

Saved successfully!

Ooh no, something went wrong!