Requirements specification

From CNM Wiki
Jump to: navigation, search

A requirements specification (alternatively known as requirements document; hereinafter, the Document) is a technical description of a proposed system. The Document is a type of a requirement.


Definitions

According to the BABOK Guide (3rd edition),

Requirements document. See requirements package.

Characterictics

Clearness

Any requirement is unambiguous if, and only if, every requirement stated therein has only one interpretation. As a minimum, this requires that each characteristic of the final product be described using a single unique term.

In cases where a term used in a particular context could have multiple meanings, the term should be included in a glossary where its meaning is made more specific. An SRS is an important part of the requirements process of the software life cycle and is used in design, implementation, project monitoring, verification and validation, and in training as described in IEEE Std1074-1997. The SRS should be unambiguous both to those who create it and to those who use it. However, these groups often do not have the same background and therefore do not tend to describe software requirements the same way. Representations that improve the requirements specification for the developer may be counterproductive in that they diminish understanding to the user and vice versa.

Subclauses 4.3.2.1 through 4.3.2.3 recommend how to avoid ambiguity.

4.3.2.1 Natural language pitfalls. Requirements are often written in natural language (e.g., English). Natural language is inherently ambiguous. A natural language SRS should be reviewed by an independent party to identify ambiguous use of language so that it can be corrected.

4.3.2.2 Requirements specification languages. One way to avoid the ambiguity inherent in natural language is to write the SRS in a particular requirements specification language. Its language processors automatically detect many lexical, syntactic, and semantic errors. One disadvantage in the use of such languages is the length of time required to learn them. Also, many non-technical users find them unintelligible. Moreover, these languages tend to be better at expressing certain types of requirements and addressing certain types of systems. Thus, they may influence the requirements in subtle ways.

4.3.2.3 Representation tools. In general, requirements methods and languages and the tools that support them fall into three general categories—object, process, and behavioral.

-Object-oriented approaches organize the requirements in terms of real-world objects, their attributes, and the services performed by those objects.

-Process-based approaches organize the requirements into hierarchies of functions that communicate via data flows.

-Behavioral approaches describe external behavior of the system in terms of some abstract notion (such as predicate calculus), mathematical functions, or state machines.

The degree to which such tools and methods may be useful in preparing an SRS depends upon the size and complexity of the program. No attempt is made here to describe or endorse any particular tool. When using any of these approaches it is best to retain the natural language descriptions. That way, customers unfamiliar with the notations can still understand the SRS.

Completeness

An SRS is complete if, and only if, it includes the following elements:a)All significant requirements, whether relating to functionality, performance, design constraints,attributes, or external interfaces. In particular any external requirements imposed by a system speci-fication should be acknowledged and treated.

b)Definition of the responses of the software to all realizable classes of input data in all realizableclasses of situations. Note that it is important to specify the responses to both valid and invalid inputvalues.c)Full labels and references to all figures, tables, and diagrams in the SRS and definition of all termsand units of measure.4.3.3.1 Use of TBDsAny SRS that uses the phrase “to be determined” (TBD) is not a complete SRS. The TBD is, however, occa-sionally necessary and should be accompanied bya)A description of the conditions causing the TBD (e.g., why an answer is not known) so that the situ-ation can be resolved;b)A description of what must be done to eliminate the TBD, who is responsible for its elimination, andby when it must be eliminated.

Consistency

Consistency refers to internal consistency. If an SRS does not agree with some higher-level document, suchas a system requirements specification, then it is not correct (see 4.3.1).4.3.4.1 Internal consistencyAn SRS is internally consistent if, and only if, no subset of individual requirements described in it conflict.The three types of likely conflicts in an SRS are as follows:a)The specified characteristics of real-world objects may conflict. For example,1)The format of an output report may be described in one requirement as tabular but in another astextual.2)One requirement may state that all lights shall be green while another may state that all lightsshall be blue.b)There may be logical or temporal conflict between two specified actions. For example,1)One requirement may specify that the program will add two inputs and another may specifythat the program will multiply them.2)One requirement may state that “A” must always follow “B,” while another may require that “Aand B” occur simultaneously.c)Two or more requirements may describe the same real-world object but use different terms for thatobject. For example, a program’s request for a user input may be called a “prompt” in one require-ment and a “cue” in another. The use of standard terminology and definitions promotes consistency.

Correctness

4.3.1 CorrectAn SRS is correct if, and only if, every requirement stated therein is one that the software shall meet.There is no tool or procedure that ensures correctness. The SRS should be compared with any applicablesuperior specification, such as a system requirements specification, with other project documentation, andwith other applicable standards, to ensure that it agrees. Alternatively the customer or user can determine ifthe SRS correctly reflects the actual needs. Traceability makes this procedure easier and less prone to error(see 4.3.8).

Modifiability

An SRS is modifiable if, and only if, its structure and style are such that any changes to the requirements canbe made easily, completely, and consistently while retaining the structure and style. Modifiability generallyrequires an SRS toa)Have a coherent and easy-to-use organization with a table of contents, an index, and explicit cross-referencing;b)Not be redundant (i.e., the same requirement should not appear in more than one place in the SRS);c)Express each requirement separately, rather than intermixed with other requirements.Redundancy itself is not an error, but it can easily lead to errors. Redundancy can occasionally help to makean SRS more readable, but a problem can arise when the redundant document is updated. For instance, arequirement may be altered in only one of the places where it appears. The SRS then becomes inconsistent.Whenever redundancy is necessary, the SRS should include explicit cross-references to make it modifiable.

Priority ranking

Ranked for importance and/or stabilityAn SRS is ranked for importance and/or stability if each requirement in it has an identifier to indicate eitherthe importance or stability of that particular requirement.Typically, all of the requirements that relate to a software product are not equally important. Some require-ments may be essential, especially for life-critical applications, while others may be desirable. Each requirement in the SRS should be identified to make these differences clear and explicit. Identifyingthe requirements in the following manner helps:a)Have customers give more careful consideration to each requirement, which often clarifies anyhidden assumptions they may have.b)Have developers make correct design decisions and devote appropriate levels of effort to the differ-ent parts of the software product.4.3.5.1 Degree of stabilityOne method of identifying requirements uses the dimension of stability. Stability can be expressed in termsof the number of expected changes to any requirement based on experience or knowledge of forthcomingevents that affect the organization, functions, and people supported by the software system.4.3.5.2 Degree of necessityAnother way to rank requirements is to distinguish classes of requirements as essential, conditional, andoptional.a)Essential. Implies that the software will not be acceptable unless these requirements are provided inan agreed manner.b)Conditional. Implies that these are requirements that would enhance the software product, but wouldnot make it unacceptable if they are absent.c)Optional. Implies a class of functions that may or may not be worthwhile. This gives the supplier theopportunity to propose something that exceeds the SRS.

Traceability

An SRS is traceable if the origin of each of its requirements is clear and if it facilitates the referencing ofeach requirement in future development or enhancement documentation. The following two types of trace-ability are recommended:a)Backward traceability (i.e., to previous stages of development). This depends upon each requirementexplicitly referencing its source in earlier documents.b)Forward traceability (i.e., to all documents spawned by the SRS). This depends upon each require-ment in the SRS having a unique name or reference number.The forward traceability of the SRS is especially important when the software product enters the operation and maintenance phase. As code and design documents are modified, it is essential to be able to ascertain thecomplete set of requirements that may be affected by those modifications.

Verifiability

An SRS is verifiable if, and only if, every requirement stated therein is verifiable. A requirement is verifiableif, and only if, there exists some finite cost-effective process with which a person or machine can check thatthe software product meets the requirement. In general any ambiguous requirement is not verifiable.Nonverifiable requirements include statements such as “works well,” “good human interface,” and “shallusually happen.” These requirements cannot be verified because it is impossible to define the terms “good,”“well,” or “usually.” The statement that “the program shall never enter an infinite loop” is nonverifiablebecause the testing of this quality is theoretically impossible.An example of a verifiable statement isOutput of the program shall be produced within 20 s of event ¥ 60% of the time; and shall beproduced within 30 s of event ¥ 100% of the time.This statement can be verified because it uses concrete terms and measurable quantities.If a method cannot be devised to determine whether the software meets a particular requirement, then thatrequirement should be removed or revised.

See also

Related lectures