23.08.2013 Views

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

Specification of Reactive Hardware/Software Systems - Electronic ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

4.8 Properties <strong>of</strong> Composites 91<br />

composition, decomposition and hiding seem to be important properties <strong>of</strong> nesting.<br />

Encapsulation is more related to structuring the problem domain into objects. Nesting<br />

is more related to the creation <strong>of</strong> a system structure, which is a design issue. Nesting<br />

and encapsulation play a role simultaneously.<br />

Process objects encapsulate their data objects. Aggregates encapsulate their part objects.<br />

They protect their encapsulated objects against direct access. All communication must<br />

be performed via the message interface <strong>of</strong> the encapsulating object.<br />

Clusters can perform nesting <strong>of</strong> clusters and objects. A cluster can hide its contents.<br />

However, clusters may be rather transparent. Collaborating objects outside a cluster<br />

may access objects in a cluster directly. Civello states that ’encapsulation can be further<br />

constrained or relaxed by limiting or extending the visibility within and across the composite<br />

object.’ This statement makes encapsulation to a more fuzzy concept. Our definitions<br />

enable determining whether an object is encapsulated or nested or both. However visibility<br />

is indeed an interesting concept. Yet we do not relate this concept to encapsulation<br />

but to communication, identification, and various forms <strong>of</strong> clustering. The concept <strong>of</strong><br />

visibility is addressed in the next subsection.<br />

4.8.3 Visibility<br />

The topic <strong>of</strong> visibility is explained by Civello as ’A necessary (but not sufficient) condition<br />

for an object to be part <strong>of</strong> another is that the whole object has the ability to send messages to<br />

the part’ [Civ93]. Visibility is a metaphor that is not grasped clearly by this description.<br />

Visibility is related here to the ability to communicate with each other. Perhaps recognition<br />

was a better metaphor than visibility to express this. Visibility has for objects the<br />

premise <strong>of</strong> knowing each other. Most object-oriented languages use an automated<br />

hidden identification mechanism. Visibility is based on this mechanism. This is different<br />

in our method. In our opinion visibility denotes that an object can perceive and recognise<br />

another object, which means that an object knows the identifier <strong>of</strong> another object and<br />

can directly communicate with it. A receiving object is an acquaintance <strong>of</strong> the sending<br />

object.<br />

Process objects know the identifiers <strong>of</strong> their data objects. Data objects also know the<br />

data objects with which they can communicate. Process objects do not necessarily know<br />

each other. They can simply send a message to a channel. In Section 6.4 about distribution<br />

we will describe this communication fashion as strongly distributed, which<br />

means that modules (process objects or clusters) communicate without the use <strong>of</strong> identifiers.<br />

Modules that communicate with the explicit use <strong>of</strong> names communicate in a<br />

weakly distributed fashion. Other process objects are invisible when a process object<br />

communicates in a strongly distributed fashion. Messages are sent and received via<br />

communication channels. A process object cannot look further than its own channels.<br />

The concept <strong>of</strong> visibility is relevant for clusters and process objects that communicate in<br />

a weakly distributed fashion. Data objects always communicate in a weakly distributed<br />

fashion. Clusters are composites that are either an aggregate or not. This influences the<br />

visibility <strong>of</strong> their internal structures.

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

Saved successfully!

Ooh no, something went wrong!