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

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

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

90 Abstraction <strong>of</strong> a Problem Domain<br />

showed that composites can be clustered or not, that they can be aggregates, and that they<br />

can communicate in a weakly distributed fashion or in a strongly distributed fashion.<br />

More in depth research showed that there are more concepts that are needed to manage<br />

complexity. Civello published a study about composites [Civ93]. He recognises the<br />

distinct roles <strong>of</strong> composites for modelling relations between problem domain concepts,<br />

and for modelling hierarchical s<strong>of</strong>tware structures.<br />

Civello describes concepts such as <strong>of</strong> encapsulation, nesting, visibility, sharing, inseparability,<br />

and <strong>of</strong> ownership. We redefine and refine these concepts for our purpose. Thus<br />

they enable reasoning about various types <strong>of</strong> modules. This is useful for model design.<br />

It helps in the communication about models among designers. It will appear that these<br />

concepts give also a deeper understanding <strong>of</strong> composites in general.<br />

4.8.2 Encapsulation and Nesting<br />

We define encapsulation as the circumstance that data and operations are hidden in an<br />

object. The concept <strong>of</strong> encapsulation refers to the object’s property <strong>of</strong> protecting individual<br />

objects against each other. An object has a shell that performs the encapsulation and that<br />

hides the internal representation <strong>of</strong> data and the implementation <strong>of</strong> operations. This shell<br />

is a message interface that defines the messages for the co-operation with other objects. For<br />

process objects the message interface also defines the communication channels. Objects<br />

exclusively communicate via messages defined in the message interface. They cannot<br />

access attributes <strong>of</strong> another object directly. Objects that communicate do not use (know)<br />

any information about the internal structure <strong>of</strong> each other.<br />

Besides encapsulation we define nesting as a separate concept. Nesting is the embedding<br />

<strong>of</strong> entities in another entity. For instance clusters and objects form composites that can<br />

be nested into a cluster. The latter cluster encompasses the composite. The purpose <strong>of</strong><br />

nesting is the hierarchical structuring <strong>of</strong> complex systems. Nesting simplifies models,<br />

because a nesting entity can hide its internal entities. We call two or more entities disjoint<br />

when none <strong>of</strong> them is (indirectly) nesting another.<br />

Civello seems to consider encapsulation and nesting as synonyms. ’An encapsulated (or<br />

nested) object is only visible within the scope <strong>of</strong> its encapsulating object’ [Civ93]. We consider<br />

encapsulation and nesting as separate concepts. Nesting does not necessarily <strong>of</strong>fer<br />

protection as encapsulation does.<br />

Hartmann et al. [HJS92] describe object embedding as a way to create nested composites,<br />

in case <strong>of</strong> static aggregation or disjoint complex objects. The description <strong>of</strong> their approach<br />

is in terms <strong>of</strong> aggregation, not encapsulation. Wegner calls encapsulation ’the fundamental<br />

unit <strong>of</strong> object granularity’ [Weg90]. America rightly states that ’the essence <strong>of</strong> object- oriented<br />

is the encapsulation <strong>of</strong> data and operations in objects and the protection <strong>of</strong> individual objects<br />

against each other’ [AL90]. Our separation matches with all these points <strong>of</strong> view.<br />

Protection seems to be the most important property <strong>of</strong> encapsulation. On the other hand

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

Saved successfully!

Ooh no, something went wrong!