Introduction
Published online by Cambridge University Press: 05 June 2012
Summary
A detailed statement of what users (or clients or customers) of a program or program fragment expect it to do and what the implementers or developers of the code expect of its environment is called a specification for that code. Sometimes the user and developer of the code might happen to be the same person wearing different hats; however, it is best to think of them as independent, possibly with conflicting interests.
If the code being specified is sufficiently complex, several programmers might be involved in writing it and several other programmers might be involved in writing a program to use the code fragment. Furthermore, there might be several different implementations of a specification, and several different applications that use the implementations. A specification is essentially a contract among all these developers and users, stating exactly what must be agreed about the observable effects of executing the code and the environment in which it will be executing, and no more. The expectations of the users become obligations on the developers, and vice versa.
Normally, details of how the computational task is to be carried out would not be in a specification: the users shouldn't care, and implementers might then be prevented from using other implementation techniques. Similarly, a specification would normally not contain details of how applications are to use the code: the developers shouldn't care, and this might preclude other applications of the code being specified.
- Type
- Chapter
- Information
- Specifying SoftwareA Hands-On Introduction, pp. 1 - 10Publisher: Cambridge University PressPrint publication year: 2002