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.

435Property-based strategiesFigure 18.5 A simple algebraic specification (2).nin such a programming language may need to be prefixed (qualified) with the objecttype, so the identifier for an operation may need to be qualified with its sort, inorder to make clear the particular instance of the operation that is required.) Thespecification of Figure 18.4 uses ‘aircraft_track’ (which may eventually be of typeinteger, but not necessarily so), and also ‘aircraft_details’.Enrichment allows a new sort to be defined that inherits the operations and axiomsof another specification. (In some cases, new operations may be defined that will ineffect overwrite some of these.) This concept is obviously closely related to theinheritance mechanism used in object-oriented programming.The present example is too simple to make use of enrichment, but it does import thesort integer, since this is required in the later definitions.The informal descriptionThe previous section illustrated the need for, and the importance of, textual commentsused to explain the mathematical formalism and to relate this to the real-world entitieswhere appropriate. The same purpose is performed by this section of the specificationin the case of the property-oriented forms. In Figure 18.5 this is added to the introductionprovided in Figure 18.4.The signatureThe purpose of the signature is to define the external ‘appearance’ of an object, bydescribing its basic properties using a set of operations. These operations usually fallinto two groups:

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

Saved successfully!

Ooh no, something went wrong!