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.

12.4 Towards an Extended <strong>Specification</strong> 397<br />

Instance variable positionNumber implements a coding <strong>of</strong> the actual position. To access<br />

and transform the positionNumber two methods are defined:<br />

instance methods<br />

positionNumber:Integer<br />

positionNumber<br />

setPositionNumberTo(i:Integer):Position<br />

positionNumber:=i;self<br />

Notice that these methods are not specified in the Object Class Diagram <strong>of</strong> Figure 12.9.<br />

The reason is that these methods are not considered essential. They are only used to<br />

express the methods that are listed in the diagram <strong>of</strong> Figure 12.9. These methods are<br />

specified as follows:<br />

setToZero:Position<br />

self setPositionNumberTo(0);self<br />

increment:Position<br />

positionNumber:=positionNumber+1;self<br />

+(d:PositionDelta):Position<br />

new (Position) setPositionNumberTo(self positionNumber + d deltaNumber)<br />

-(p:Position):PositionDelta<br />

new (PositionDelta) setDeltaNumberTo(self positionNumber - p positionNumber);<br />

=(p:Position):Boolean<br />

(p positionNumber) = (self positionNumber)<br />

asInitialPosition:InitialPosition<br />

new (InitialPosition) setPositionNumberTo(self positionNumber)<br />

The last method is used to create an InitialPosition that is equivalent to the receiver <strong>of</strong><br />

the asInitialPosition object.<br />

12.4 Towards an Extended <strong>Specification</strong><br />

The current generation <strong>of</strong> mailing machines is build upon a centralised control concept.<br />

The initial requirements <strong>of</strong> the new generation <strong>of</strong> mailing machines state that these<br />

machines should be build from plug-and-play stations all equipped with their own<br />

intelligence. This requirement was at the basis <strong>of</strong> the essential specification we presented<br />

in the previous section. The essential specification is still too abstract to be implemented<br />

directly. First it has to be refined into an extended specification by adding implementationoriented<br />

architecture and behaviour elements.

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

Saved successfully!

Ooh no, something went wrong!