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.

MoML<br />

A second difference between our graphs and mathematical graphs is that our relations are multiway<br />

associations, whereas an arc in a graph is a two-way association. A third difference is that mathematical<br />

graphs normally have no notion of hierarchy (clustering).<br />

Relations are intended to serve a mediators, in the sense of the Mediator design pattern[42].<br />

“Mediator promotes loose coupling by keeping objects from referring to each other explicitly...” For<br />

example, a relation could be used to direct messages passed between entities. Or it could denote a transition<br />

between states in a finite state machine, where the states are represented as entities. Or it could<br />

mediate rendezvous between processes represented as entities. Or it could mediate method calls<br />

between loosely associated objects, as for example in remote method invocation over a network.<br />

7.2.2 Abstraction<br />

Composite entities (clusters) are entities that can contain a topology (entities and relations). Clustering<br />

is illustrated by the example in figure 7.4. A port contained by a composite entity has inside as<br />

well as outside links. Such a port serves to expose ports in the contained entities as ports of the composite.<br />

This is the converse of the “hiding” operator often found in process algebras. Ports within an<br />

entity are hidden by default, and must be explicitly exposed to be visible (linkable) from outside the<br />

entity 3 . The composite entity with ports thus provides an abstraction of the contents of the composite.<br />

E1<br />

E2<br />

P1<br />

R1<br />

3. Unless level-crossing links are allowed. MoML supports these, but they are discouraged.<br />

P3<br />

P2<br />

E3<br />

R2<br />

Heterogeneous Concurrent Modeling and Design 195<br />

P4<br />

P5<br />

E4<br />

E5<br />

P6<br />

FIGURE 7.4. Ports (P3 and P4) are linked to relations (R1 and R2) below their container (E1) in the hierarchy.<br />

They may also be linked to relations at the same level (R3 and R4).<br />

R4<br />

R3<br />

E0

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

Saved successfully!

Ooh no, something went wrong!