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.7 Identity and Object Identifiers 87<br />

4.7 Identity and Object Identifiers<br />

4.7.1 Identity<br />

Any object that is instantiated has an identity based on the bare fact that it exists. Identity<br />

is not just a property. The expression ’has an identity’ suggests this. The wording ’an<br />

object is an identity’ is more pure. Objects are always distinct entities, even if they<br />

cannot be distinguished by their behaviour or their internal values. Objects cannot be<br />

identified by their behaviour or internal values. The same identity guarantees the same<br />

behaviour, however the same behaviour does not imply the same identity.<br />

4.7.2 Identifiers<br />

Unique identifiers (or unique names) enable distinction between separate identities. Identity<br />

and identifier are independent concepts. An identifier is an artificial construct that<br />

enables identification. Objects may be defined as having a property called an identifier<br />

(or name). This must be a unique value within the scope where an explicit distinction<br />

between identities (objects) has to be made. Defining such property can be a modelling<br />

decision during analysis. However, in many cases a predefined type <strong>of</strong> identifier is<br />

imposed by the design environment or the language(s) to be used. Some execution environments<br />

give unique numbers to objects, so that unique identification is guaranteed.<br />

There is no agreement whether objects should have identifiers during analysis. Rumbaugh<br />

et al. state that explicit object identifiers are not required in an object model<br />

[R 91]. This may be true for a class-oriented approach, but instance based models<br />

require identifiers in practice.<br />

The practical use <strong>of</strong> identifiers leads to problems due to the artificial nature <strong>of</strong> identifiers.<br />

An identifier cannot grasp the real essence <strong>of</strong> identity. The attempt to uniquely identify<br />

objects is performed by implementations that are not powerful enough to overcome all<br />

problems in space and time:<br />

Space: A system may be distributed. Several system parts may be developed in<br />

different design environments that do not know each others name spaces.<br />

Time: Persisting objects may need unique identifiers, independent <strong>of</strong> the time they<br />

are processed.<br />

Uniqueness is related to the concept <strong>of</strong> name space. Wegner [Weg87] defines a ’unit<br />

<strong>of</strong> naming’ in the context <strong>of</strong> distributed systems, as ’the unit that determines name space’.<br />

A distributed system is built from units (grains), and within the units a name must be<br />

unique. There are also other applications <strong>of</strong> the concept <strong>of</strong> name space. It can be useful<br />

when a name space is known only by particular owners and users. Separate name<br />

spaces can also be used for protection and hiding.<br />

Models become even more complex when identities can change dynamically. For instance,<br />

two objects might be a description <strong>of</strong> the same identity. In that case one may

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

Saved successfully!

Ooh no, something went wrong!