Page 112 -
P. 112
4.3 Requirements specification 95
Notation Description
Natural language sentences The requirements are written using numbered sentences in natural
language. Each sentence should express one requirement.
Structured natural language The requirements are written in natural language on a standard form or
template. Each field provides information about an aspect of the
requirement.
Design description languages This approach uses a language like a programming language, but with
more abstract features to specify the requirements by defining an
operational model of the system. This approach is now rarely used
although it can be useful for interface specifications.
Graphical notations Graphical models, supplemented by text annotations, are used to define
the functional requirements for the system; UML use case and sequence
diagrams are commonly used.
Mathematical specifications These notations are based on mathematical concepts such as finite-state
machines or sets. Although these unambiguous specifications can reduce
the ambiguity in a requirements document, most customers don’t
understand a formal specification. They cannot check that it represents
what they want and are reluctant to accept it as a system contract.
the different sub-systems that make up the system. As I discuss in Chapters 6
Figure 4.8 Ways of
writing a system and 18, this architectural definition is essential if you want to reuse software
requirements components when implementing the system.
specification
2. In most cases, systems must interoperate with existing systems, which constrain
the design and impose requirements on the new system.
3. The use of a specific architecture to satisfy non-functional requirements (such
as N-version programming to achieve reliability, discussed in Chapter 13) may
be necessary. An external regulator who needs to certify that the system is safe
may specify that an already certified architectural design be used.
User requirements are almost always written in natural language supplemented
by appropriate diagrams and tables in the requirements document. System
requirements may also be written in natural language but other notations based on
forms, graphical system models, or mathematical system models can also be
used. Figure 4.8 summarizes the possible notations that could be used for writing
system requirements.
Graphical models are most useful when you need to show how a state changes or
when you need to describe a sequence of actions. UML sequence charts and state
charts, described in Chapter 5, show the sequence of actions that occur in response
to a certain message or event. Formal mathematical specifications are sometimes
used to describe the requirements for safety- or security-critical systems, but are
rarely used in other circumstances. I explain this approach to writing specifications
in Chapter 12.