13.07.2015 Views

Software Design 2e - DIM

Software Design 2e - DIM

Software Design 2e - DIM

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.

437Property-based strategiesFigure 18.7A complete algebraic specification.In the example of the aircraft_table, each of the inspection operations can be relatedto each of the constructor operations. So, for example, the inspection operation last isfirst related to the operation create, by stating that last will return a value that correspondsto the upper bound used in the create operation. last is then related to theinsert and remove operations using a recursive form of definition.The eval operation can also be related to each of the constructor operations. Theaxiom used to relate it to create can be interpreted as meaning: ‘inspecting any elementin a newly defined table will result in an undefined result’. This makes sense, since novalues will have been inserted into the table at the point of its creation, and so attemptingto read from it will have undefined effects.

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

Saved successfully!

Ooh no, something went wrong!