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.

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

feedServer<br />

Object A<br />

cardInjector<br />

Object C<br />

Figure 4.7: References<br />

Object B<br />

objects. In order to ask object A what its ’feedServer’ is, object A must export a service<br />

which means that it can accept a message, e.g. whatIsYourFeedServer. When object A<br />

receives this message it returns object B, which means that object A gets a reference to<br />

object B. So the sender <strong>of</strong> the message receives object B as a result <strong>of</strong> the communication.<br />

Notice that there is no real distinction between receiving a reference and receiving a<br />

data object. There is no explicit notion ’pointer’. An object ’has’ other objects, by having<br />

them as ’acquaintances’ which are implicitly known by references.<br />

4.4.2.4 Primitive Data Classes<br />

Analysis <strong>of</strong> a problem domain may lead to complex entities formed by data objects.<br />

Data objects that are linked by references can form such complex structures. The basic<br />

building blocks <strong>of</strong> such a structure can be relatively simple data objects. The work <strong>of</strong><br />

defining all classes is decreased by having some primitive classes. POOSL <strong>of</strong>fers the<br />

following primitive data classes: Boolean, Integer, Real, and Char. These classes define<br />

the usual operations such as relational and mathematical operations.<br />

The primitive data classes are extended with primitive data objects: bunk, iunk, runk, and<br />

cunk. They represent the ’unknown’ value in their respective classes Boolean, Integer,<br />

Real, and Char. They have been introduced to model non- deterministic behaviour <strong>of</strong><br />

a system. Another primitive object is nil. A nil object can prevent the occurrence <strong>of</strong><br />

a so-called ’dangling pointer’. Such a void reference is properly represented by a nil<br />

object. Nil solely <strong>of</strong>fers the primitive equality operation == which determines whether<br />

two objects refer to the same object.

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

Saved successfully!

Ooh no, something went wrong!