What Is Requirements Risk Management?
Poor requirements engineering practices have led to some spectacular failures. Bahill and Henderson ( 2005 ) analyzed several high-profile projects to determine if their failure was due to poor requirements development, requirements verification, or system validation. Their findings confirmed that some of the most notorious system failures were due to poor requirements engineering. For example, the HMS Titanic (1912), the IBM PCjr (1983), and the Mars Climate Orbiter (1999) suffered from poor requirements design. The Apollo 13 (1970), Space Shuttle Challenger (1986), and Space Shuttle Columbia (2002) projects failed because of insufficient requirements verification. More recently, the rollout of the U.S. Healthcare.gov healthcare exchange site (2013) experienced numerous and very conspicuous problems due to a rushed implementation and failure to conduct proper requirements elicitations. More catastrophically, crashes of the Boeing 737 Max aircraft were eventually attributed to poor requirements design ( Table 6.1 ).
Table 6.1 A History of Project Failures Due to Poor Requirements Practices | System Name | Year | Requirements Process Failure | | --- | --- | --- | | HMS Titanic | 1912 | Poor requirements design | | Apollo-13 | 1970 | Insufficient requirements verification | | IBM PCjr | 1983 | Poor requirements design | | Space Shuttle Challenger | 1986 | Insufficient requirements verification | | Mars Climate Orbiter | 1999 | Poor requirements design | | Space Shuttle Columbia | 2002 | Insufficient requirements verification | | HealthCare.gov | 2013 | Poor requirements design | | Boeing 737 Max | 2019 | Poor requirements design |
Source: Adapted from Bahill, T.A. & Henderson, S.J., Syst. Eng ., 8, 1–14, 2005.
Requirements can be inadequate in many ways including:
- Inaccurate or incomplete stakeholder identification
- Insufficient requirements validation
- Insufficient requirements verification
- Incomplete requirements
- Incorrect requirements
- Incorrectly ranked requirements
- Inconsistent requirements ( Laplante 2010 )
Requirements risk management involves the proactive analysis, identification, monitoring, and mitigation of any factors that can threaten the integrity of the requirements engineering process. Requirements risk factors can be divided into two types: technical and management. Technical risk factors pertaining to the elicitation, analysis, agreement, and representation processes have already been discussed in Chapters 3 and 4 . In Chapter 7 , we discuss the use of formal methods in improving the quality of requirements representation through mathematically rigorous approaches. Requirements management risk factors tend toward issues of expectation management and interpersonal relationships, and these are discussed in Chapter 10 .
Share your Opinion: Do you have a real-world story of a project failure due to poor requirements practices?
https://phil.laplante.io/requirements/failures.php
In this chapter, we wish to focus on the mitigation of requirements risk through the analysis of the requirements specification document itself. That is, the validation and verification of the Software Requirements Specification (SRS) should occur early in order to avoid costly problems further downstream. There are a variety of complementary and overlapping techniques to check the quality attributes of the SRS, but the IEEE 29148 contains a set of rules that are extremely helpful in vetting the technical aspects of the SRS and, in turn, the mitigating risk later on. So in this chapter, we will look at the nature of SRS verification and validation, at various qualities of “goodness” for requirements specifications, and, finally, turn to work at NASA that can be very helpful in comprehending these qualities of goodness.
To further motivate the notion of requirements risk, consider this scenario. 1 On a road that one of the authors travels in Pennsylvania there is a sign that declares “End brake retarder prohibition.” The meaning of this sign is hard to understand and is blurred by the curious use of a quadruple negative (each word in the directive has the connotation of stopping something). As it turns out, this sign is an interesting example of a “shall not” requirement as well as illustrating a poor requirements specification, namely, one that is ambiguous, vague, contradictory, incomplete, or contains a mixed level of abstraction.
What is a “brake retarder”? Briefly, it is a device used on large trucks to slow the engine down by allowing air to be exhausted out of the pistons, thus slowing the vehicle. Brake retarders are very noisy, and, as a result, many municipalities prohibit their use within city limits. By Pennsylvania law, appropriate signs must be posted with the instructions “Brake Retarders Prohibited Within Municipal Limits.” The complementary sign then reads “End Brake Retarder Prohibition.” The latter phrasing is, apparently, unique to the Commonwealth of Pennsylvania ( O’Neil 2004 ). In some states, the sign pair reads “No Jake Brakes” and “End Jake Brake Prohibition,” the term “Jake” being a nickname of a company that manufactures the device, Jacobs Vehicle Systems.
Let’s have a little fun with the Pennsylvania form of the sign. If we substitute the synonyms:
end → stop, brake → stop, retarder → stopper, prohibition → stopping
the sign translates to:
stop stop stopper stopping
which is a quadruple negative. In theory, we should be able to replace such a quadruple negative with a null sign reading:
Ø
The original sign has the paradoxical effect, however, of causing a positive action (i.e., to allow the application of brake retarders).
Of course, this whimsical discussion ignores the fact that the word “end” is a verb, “retarder” and “prohibition” are nouns, and in this context “brake” is an adjective, rendering a logical analysis of meaning more difficult. And the sign really does have the intended effect—truck drivers know what the sign means. But it should be clear that this particular sign can be interpreted multiple ways and is, therefore, ambiguous.
The “brake retarder” sign is a poor one—but perhaps not nearly as poor as the requirements for installing one. Pennsylvania’s requirements on municipalities who wish to implement a “no brake retarder” zone are:
- Downhill grade(s) greater than 4%
- A posted reduced speed limit for trucks due to a hazardous grade determination
- Posted reduced gear zone(s)
- Posted speed limits over 55 miles/hour
- Highway exit ramps with a posted speed limit over 55 miles/hour
The crash history for the stretch of road a municipality is seeking to keep brake-retarder free must not include:
- A history of runaway truck crashes over the past 3 years
- A discernible pattern of rear-end crashes over the past 3 years where the truck was the striking vehicle ( O’Neil 2004 )
The italic font was added to the latter section because it highlights the fact that the requirements on brake retarder prohibitions contain an embedded “shall not” requirement.
Given all of this confusion, clearly, a better job in formulating the sign language is needed, and more work is needed in formulating the requirements for the sign. Formal methods may have been advisable in this regard. All of these activities fall under the context of requirements risk management.
Validation and Verification
Requirements validation and verification involve review, analysis, and testing to ensure that a system complies with its requirements. Compliance pertains to both functional and nonfunctional requirements. But the foregoing definition does not readily distinguish between verification and validation, and is probably too long, in any case, to be inspirational or to serve as a mission statement for the requirements engineer. Boehm ( 1984 ) suggests the following to make the distinction between verification and validation:
- Requirements validation: “am I building the right product?”
- Requirements verification: “am I building the product right?”
- In other words, validation involves fully understanding customer intent and verification involves satisfying the customer intent.
There are great benefits of implementing a requirements verification and validation program. These include:
- Early detection and correction of system anomalies
- Enhanced management insight into the process and product risk
- Support for life cycle processes to ensure conformance to program performance and budget
- Early assessment of software and system performance
- Ability to obtain objective evidence of software and system conformance to support process
- Improved system development and maintenance processes
- Improved and integrated systems analysis model (IEEE Std 1012 2012)
Requirements validation involves checking that the system provides all of the functions that best support the customer’s needs and that it does not provide the functions that the customer does not need or want. Additionally, validation should ensure that there are no requirements conflicts and that satisfaction of the requirements can actually be demonstrated. Finally, there is some element of sanity check in terms of time and budget—a requirement may be able to be literally met, but the cost and time needed to meet it may be unacceptable or even impossible.
Requirements verification (testing) involves checking the satisfaction of a number of desirable properties of the requirements (e.g., IEEE 29148 rules). Usually, we do both validation and verification (V&V) simultaneously, and often the techniques used for one or the other are the same.
Bahill and Henderson ( 2005 ) offer an informal verification/validation demonstration for a set of requirements for an electric water heater controller.
- If 70° <temperature <100°, then the system shall output 3,000 W.
- If 100° <temperature <130°, then the system shall output 2,000 W.
- If 120° <temperature <150°, then the system shall output 1,000 W.
- If 150° <temperature, then the system shall output 0 W.
We notice that this set of requirements is incomplete because the behavior for temperature <0° is not defined. The requirements are also inconsistent—for example, what happens when temperature = 125°? The requirements are also incorrect because the temperatures given are not specified as being in degree Fahrenheit or degree Celsius. Clearly, this set of requirements could have benefited from effective V&V processes.
Techniques for Requirements V&V
V&V techniques may include some of the requirements elicitation techniques that were discussed in Chapter 3 . For example, group reviews/inspections, focus groups, prototyping, viewpoint resolution, or task analysis (through user stories and use cases) can be used to simplify, combine, or eliminate requirements. In addition, we can use comparative product evaluations to uncover missing or unreasonable requirements and task analysis to uncover and simplify requirements. Systematic manual analysis of the requirements, test-case generation (for testability and completeness), using an executable model of the system to check requirements, and automated consistency analysis may also be used. Wideband Delphi or the Analytical Hierarchy Process (see Chapter 10 ) can be used for requirements reconciliation, harmonization, and negotiation. Finally, certain formal methods such as model checking and consistency analysis can be used for V&V, and these will be discussed in Chapter 7 .
Walkthroughs
Walkthroughs or peer/team reviews are an informal methodology to detect errors and improve requirements quality. A typical walkthrough scenario involves requirements engineers, a supervisor, and peers participating in a semi-structured meeting to review the requirements before release. The goal is to identify ambiguities and inconsistencies and to determine if the requirements can be tested. The IEEE 29148 rules can be used as a framework or checklist for the walkthrough.
Inspections
Inspections are a method of requirement quality control that can be informal (ad hoc) or highly structured. More formal inspection processes, such as those described by Fagan ( 1986 ), provide close procedural control and repeatability. Fagan inspections define the following:
- What can be inspected
- When the code can be inspected
- Who can inspect the code
- What preparation is needed for the inspection
- How the inspection is to be conducted
- The data to be collected
- The follow-up activities
Inspection can be used in many kinds of requirements engineering settings but is especially appropriate for safety-critical systems.
The inspection team is typically comprised of about several people, who are selected from among the following candidates:
- Author(s) of the requirements being inspected.
- The reader who reads the requirements to the team during the inspection meeting.
- One or more inspectors who find errors, omissions, and inconsistencies. Appropriate inspectors of a requirements document include the project manager and a representative of the actual users.
- Representatives of anyone who has to do work based on the document bring a vital perspective. These include architects, designers, system test engineers, documentation writers, and support representatives.
- The moderator who chairs the inspection meeting and notes discovered errors.
- Scribe taking notes on the inspection process results.
- Representatives from other stakeholder groups such as program sponsors or primary users of the system.
The inspection process stages include:ss
- The Preparation Stage : During preparation, inspectors examine the requirements document to understand it and to find possible defects. Inspectors use checklists of typical requirements defects to help focus their attention.
- Inspection Meeting : During the inspection meeting, the reader describes their interpretation of each requirement in their own words. Such paraphrasing allows the other participants to compare their understanding with that of someone other than the author. Differences in interpretation can reveal omissions and surface assumptions. During the meeting, the record keeper documents the change requests, and the meeting moderator ensures the review is on track.
- Rework : In this stage, a list of change requests is assembled, and a record of the minutes meeting is documented. The requirements engineer then works on the change requests to fix the found issues.
Goal-Based Requirements Analysis
Stakeholders tend to express their requirements in terms of operations and actions rather than goals. A risk is posed when goals evolve as stakeholders change their minds and refine and operationalize goals into behavioral requirements. To reduce this risk, stakeholder goals need to be evolved until they can be structured as requirements.
Goal evolution is facilitated through goal elaboration and refinement. Useful techniques for goal elaboration include identifying goal obstacles, analyzing scenarios and constraints, and operationalizing goals. Goal refinement occurs when synonymous goals are reconciled, when goals are merged into a subgoal categorization, when constraints are identified, and when goals are operationalized ( Hetzel 1988 ). Regarding operationalization, we will refer to goals-based analysis when discussing metrics generation.
The 2020 survey on requirements engineering state of practice (Kassab and Laplante survey 2022) gives some clues to the prevalence of the aforementioned V&V techniques in industry ( Figure 6.1 ).
Figure 6.1 Requirements inspection techniques used (Kassab and Laplante 2022).
For example, the survey results showed that team review techniques were used widely (about 38% reporting), and checklists were used by 23% of those reporting.
Stay Updated: For the up-to-date data from the RE state of practice survey.
https://phil.laplante.io/requirements/updates/survey.php
Other techniques reported included ad hoc walkthroughs (20%) and circulating copy (where an electronic markup copy of the SRS is shared by the team) (12%). Automated review of the SRS document, which was only noted by 4% of respondents, will be discussed shortly.
Requirements Understanding
In an early and influential book on software testing, Bill Hetzel proposed several paradigms for requirements verification and validation. To set the stage for this V&V, Hetzel addressed the problem of requirements understanding through the following analogy.
Imagine you are having a conversation with a customer in which he says that he would like for you to develop some kind of health management system, which, among other things, ensures that patients are eating a “well-balanced meal.” You readily agree to this requirement. Many weeks later as you begin thinking about a system design, you reconsider the requirement to provide a well-balanced meal. What does that mean? In one interpretation, it could mean adding up everything consumed; were minimum nutritional guidelines in terms of calories, protein, vitamins, and so forth met? Another interpretation is that the patient ate exactly three, similar sized meals. Yet another interpretation is that the meals were well balanced in the sense that each food item weighed the same amount ( Hetzel 1988 ).
Aside from the more ridiculous interpretations of “well-balanced meal,” the above example illustrates a problem. The phrase “well-balanced meal” may have no language equivalent in French, Hindi, Mandarin, or any other language. So “well-balanced meal” could create a problem for some nonnative English speakers. What other colloquialisms do we use in our specifications and then ship out for offshore development? Clearly, there are various problems that can arise from language and cultural differences.
One solution to the requirements understanding problem is offered by Hetzel. He suggests that for correct problem definition it is best to specify the test for accepting a solution along with the statement of the requirement. For example, if we propose a requirement for a “well-balanced meal,” we also offer a test for satisfying the requirement—that the meal must fall within the specified ranges of protein, fat, salt, sugar, and caloric content.
When the statement and test are listed together, most problems associated with misunderstanding requirements disappear. In particular, we want to derive requirements-based test situations and use them as a test of requirement understanding and validation.
For example, when a requirement is found to be incomplete, we can use the test case to focus on missing information. That is, design the test case to ask the question, “What should the system do in this case when this input is not supplied?” Similarly, when a requirement is found to be fuzzy or imprecise, use a test case to ask the question, “Is this the result I should have in this situation?” The specific instance will focus attention on the imprecise answer or result and ensure that it is examined carefully ( Hetzel 1988 ). Then an appropriate requirement can be introduced to deal with any lingering imprecision, ambiguity, or missing behavior. Today, Hetzel’s approach would be called test-driven development.
Validating Requirements Use Cases
When use cases comprise part of the requirements, these can be validated by asking a simple set of questions:
- Are there any additional actors that are not represented?
- Are there any activities that are not represented?
- Are each actor’s goals being met?
- Are there events in the use case that do not address these goals?
- Can the use case be simplified?
Other related questions can also be generated.
Prototyping
Prototypes are useful in V&V when very little is understood about the requirements or when it is necessary to gain some experience with the working model in order to discover requirements. The principle behind using working prototypes is the recognition that requirements change with experience and prototyping yields that experience.
In software systems, incremental and evolutionary development approaches are essentially based on a series of non-throwaway prototypes. The difference between the two approaches is, essentially, that in incremental development the functionality of each release is planned, whereas, in evolutionary development, subsequent releases are not planned out. In both incremental and evolutionary development, lessons learned from prior releases inform the functionality of future releases’ incremental and evolutionary development. In essence, early versions are prototypes used for future requirements discovery.
One point mentioned in Chapter 3 , which should be reemphasized, is that prototypes are not always effective in uncovering nonfunctional requirements. This problem arises especially in novel systems and when certain requirements can only be found through an analysis of prevailing standards, applicable laws, customs, and so forth.
Tools for V&V
In the last two decades, there have been many attempts to build tools to support the formulation, documentation, and verification of natural language requirements. There are numerous tools that use natural language processing (NLP) to mitigate the problems and increase the quality of natural language requirements (see Table 6.2 ).
| Tool Name | Year | Aim | Input | Automation |
| Circe | 2006 | Quality of requirements | Requirements document | Semi-automated |
| QuARS | 2004 | Quality of requirements | Requirements document | Automated |
| CRF Tool | 2012 | Uncertainty | Requirements document | Automated |
| Text2Test | – | Quality of use cases | Use cases | Unknown |
| AQUSA | 2015 | Quality of user stories | User stories | Automated |
| MaramaAI | 2011 | Quality of requirements | Requirements document | Not automated |
| SREE | 2013 | Ambiguity | Requirements document | Not available |
| Dowser | 2008 | Ambiguity | Requirements document | Not automated |
| RQA | 2011 | Quality of requirements | Requirements document | Automated |
| UIMA | 2009 | Use case model | Use case description | Not automated |
| Qualicen | 2014 | Quality of requirements | Requirements document | Automated |
| EARS | 2010 | Requirements Template Violations | Requirements document | Automated |
| RETA | 2013 | Requirements Template Violations | Requirements document | Automated |
| Planguage | 2005 | Quality of requirements | Requirements document | Automated |
For example, Femmer et al. ( 2014 ) built a lightweight tool to detect “requirements smells,” that is, various forms of phrases and word combinations that could be considered ambiguous, vague, incomplete, or problematic. Another tool, quality analyzer for requirements specification (QuARS), uses automated lexical and syntactic analyses to “identify requirements that are defective because of language usage” ( Lami 2005 ). Another natural language analysis tool, the NASA automated requirements measurement (ARM), is discussed in detail later in the chapter.
Other automated analysis tools require that the SRS conforms to standard templates and boilerplates. For example, the easy approach to requirements engineering (EARS) tool can find template violations. Similarly, the requirements template analyzer (RETA) can find template violations and also identify certain problematic requirements based on keywords ( Arora et al. 2015 ).
Restricting the language that can be used in the specification document is another way to facilitate automated requirements V&V. One such tool, planning language ( Planguage), uses a programming language like syntax to structure requirements and then analyze them ( Gilb 2005 ).
Gervasi and Nuseibeh ( 2002 ) proposed a lightweight validation of natural language requirements (Circe) that can detect violations of quality characteristics in a more exact way by building logical models of the requirements specifications. Their approach, however, assumes that the specifications are written in certain patterns. This expectation is often not the case in the industry.
Share your Opinion: From your professional experience, which validation tools for software requirements specification documents are your favorite, and why?
https://phil.laplante.io/requirements/validation.php
Other automated tools for requirements V&V are designed to be used with formal methods notations (see Chapter 7 ).
Requirements V&V Matrices
A requirements validation matrix is an artifact that associates high-level requirements with certain system attributes for the purposes of trade-off analysis and confirmation of requirement intent. Appropriate system attributes can include business need, safety, requirement volatility, and other factors. A matrix that connects system requirements to business and stakeholder requirements is an example of a validation matrix. Creating this validation matrix is important because failure to do so may mean missing an important connection between a feature and cost means risking unplanned expenses. These missing links may cause a ripple effect and create slowdowns in product launches, weaken stakeholder confidence, and adversely affect the overall project budget. Feature cost could also be included in the validation matrix, but this issue is discussed in Chapter 11 .
One format for the requirements validation matrix for several requirements from the baggage handling system is shown in Table 6.3 .
Table 6.3 Requirements Validation Matrix | Requirement Number | Safety Impact (high = 10) | Volatility (high = 10) | Business Need (high = 10) | | --- | --- | --- | --- | | 3.1 | 10 | 2 | 10 | | 3.2 | 2 | 1 | 5 | | … | … | … | … | | 3.210 | 3 | 6 | 7 | | 3.211 | 5 | 10 | 1 |
While the requirements validation matrix is used early in the project life cycle, a requirement verification matrix is used later. The requirements verification matrix associates requirements with test cases that verify that the requirement has been met. Such a matrix facilitates a review of requirements and the tests and provides an easy mechanism to track the status of test-case design and implementation. An excerpt from a requirements verification matrix for the smart home system SRS documents is shown in Table 6.4 .
| Requirement | Test Cases | Status |
| 9.13.1 System shall provide wireless support for driving any number of wall-mounted monitors for picture display. | T-1711 | Passed |
| T-1712 | Passed | |
| T-1715 | Passed | |
| 9.13.2 System shall provide web-based interface for authenticated users to publish new photos for display on wall monitors. | T-1711 | Passed |
| T-1715 | Failed | |
| T-1811 | Passed | |
| 9.13.3 System shall allow users to configure which pictures get displayed. | T-1712 | Passed |
| T-1715 | Passed | |
| T-1811 | Passed | |
| T-1812 | Passed | |
| T-1819 | Not run | |
| 9.13.4 System shall allow users to configure which remote users can submit pictures to which wall monitor. | T-1712 | Passed |
| T-1715 | Passed | |
| T-1716 | Passed | |
| T-1812 | Passed |
Here the requirements forming the SRS are listed verbatim in the left column, the tests that verify those requirements are listed in the middle column, and the test case status is in the right column. The status field can contain “passed,” “failed,” “not run,” “omitted,” or any variation of these keywords. Additional columns can be added to the matrix to indicate when the test was run, who conducted the test, where the test was run, the status of testing equipment used, and for comments and other relevant information.
The requirements verification matrix is easily made part of the master test plan and can be updated throughout the project to give a record of all requirements testing.
Standards for V&V
There are various international standards for the processes and documentation involved in V&V of systems and software. Many of these have been sponsored or cosponsored by the Institute for Electrical and Electronics Engineers (IEEE).
Whatever requirements V&V techniques are used, a software requirements V&V plan should always be written to accompany any major or critical software application.
The IEEE Standard 1012–2012, IEEE Standard for Software Verification and Validation, provides some guidelines to help prepare V&V plans. Figure 6.2 shows the recommended V&V plan outline (IEEE Std 1012-2012).
Figure 6.2 Recommended V&V plan table of contents. (From IEEE Std 1012-2012, IEEE Standard for Software Verification and Validation , Institute for Electrical and Electronics Engineers, Piscataway, NJ, 2004. With permission.)
This template can be customized for most situations.
ISO/IECIEEE Standard 29148
ISO/IEC/IEEE 29148 (we refer to it as IEEE 29148 for short) is a very important standard for requirements engineers. The IEEE 29148 “describes recommended approaches for the specification of software requirements.” The standard attempts to help:
- Software customers to accurately describe what they wish to obtain
- Software suppliers to understand exactly what the customer wants
-
Individuals to accomplish the following goals:
- Develop a standard software requirements specification (SRS) outline for their own organizations
- Define the format and content of their specific SRSs
- Develop additional local supporting items, such as an SRS quality checklist or an SRS writer’s handbook (ISO/IEC/IEEE Std 29148 2011)
But from a risk mitigation standpoint, we are most interested in the qualities of goodness for the requirements document that are described. The IEEE 29148 specifies qualities for individual requirements and then for the set of requirements taken as a whole. First, the mandatory qualities for an individual requirement are that it must be:
- Singular
- Feasible
- Unambiguous
- Complete
- Consistent
- Verifiable
- Traceable
Then, taken collectively, the set of all requirements in an SRS document should exhibit the following properties:
- Complete
- Consistent
- Bounded
- Affordable
The first two properties are the same as for a single requirement as they are for a group of requirements and they will be discussed shortly. Next, a set of requirements is bounded if it does not exceed the scope of the system intent. Finally, affordable requirements are those that can be satisfied within budgetary constraints. Chapter 11 covers the topic of value engineering of requirements, which deals with the issue of affordability.
We now look at each of the qualities for individual requirements in some detail.
Singularity
The IEEE 29148 mandates that a requirement specifies a single behavior and has no conjunctions. For example, consider this requirement for the wet-well control system described in Appendix B.
- 3.1.1 The pump control unit shall start the submersible pump motors to prevent the wet well from running over and stop the pump motors before the wet well runs dry.
This requirement could be separated into two:
- 3.1.1.1 The pump control unit shall start the submersible pump motors to prevent the wet well from running over.
- 3.1.1.2 The pump control unit shall stop the pump motors before the wet well runs dry.
The problem with the conjunctions “and” and “or” is that they can introduce some ambiguity. For example, is the “or” an inclusive “or” or an exclusive one. If the requirement contains two parts separated by the word “and,” this could imply a sequence of events or it could mean that the events can occur in parallel. In the example for the wet-well control system given above, this ambiguity does not arise, but it could in other instances. It is better to leave out conjunctions when possible.
Feasibility
A requirement is feasible if it can be satisfied with current technology and cost constraints, that is, it is not a ridiculous requirement. As of examples of infeasible requirements:
- The system shall consume no energy.
- The length of the beam shall be less than 0 feet.
Various techniques can be used to assess feasibility including reviews, inspections, and competitive analysis. A value engineering analysis (see Chapter 11 ) also needs to be conducted to ensure feasibility.
Ambiguity
We define ambiguity by complementation—a requirement is unambiguous if it can have only one interpretation.
Here is an example of an ambiguous requirement:
If the valve is open and the drain is open, then it should be closed.
It is not clear whether “it” refers to the “valve” or the “drain.” Conjunctions can cause ambiguity and that is why they should be avoided.
Here is another example of a specification document in which ambiguous behavior was described. In a certain automobile (belonging to one of the authors), an indicator light is displayed (in the shape of an engine) when certain exceptional conditions occur. These conditions include poor fuel quality, fuel cap not tightened properly, and other fuel-related faults. According to the user’s manual, if the cause of the problem is relatively minor, such as the fuel cap not tightened, the system will reset the light upon:
Removing the exceptional condition followed by three consecutive error-free cold starts. A cold start is defined as a start-up that has not been preceded by another engine start-up in the last eight hours, followed by several minutes of either highway or city driving.
Can you see the problem in this functional definition? Aside from its confusing wording, the requirement does not make sense. If you wait 8 hours from the previous start-up, then start the engine to drive somewhere, you have to wait at least 8 hours to start up and drive back to your origin. If you have any warm start before three consecutive cold starts, the sequence has to begin again. Is the only possible way to satisfy this condition to drive somewhere, wait there for 8 hours and then drive back to the origin (three times in a row)? Or, drive around for a while, return to the origin, wait 8 hours, then do it again (two times more)? This sequence of events is very hard to follow, and in fact, after 1 month of trying, the first author (Laplante) could not get the light to reset without disconnecting and reconnecting the battery.
Another reason why ambiguity is so dangerous is that, in an ambiguous requirements specification, literal requirements satisfaction may be achieved but not customer satisfaction. “I know that is what I said I wanted, but now that I see it in action, I realized that I really meant something else” is an unfortunate refrain. Or consider this fictitious quote—“oh, you meant ‘that’ lever; I thought you meant the other one.” We would never want this scenario to be played out late in the system’s life cycle.
Some of the techniques that could be used to resolve the ambiguity of a requirement include formal reviews, viewpoint resolution, and formal modeling of the specification.
Completeness
Boehm ( 1984 ) postulates that a requirement is complete “to the extent that all of its parts are present and each part is fully developed.” This definition is corroborated by Menzel et al. ( 2010 ): “[completeness is] the sense of whether the specification contains all requirements and whether all requirements contained in the specification are completely specified.” According to the IEEE 29148, a single requirement is complete if it is “measurable and sufficiently describes the capability and characteristics to meet the stakeholder’s need.”
We will use the following definition for completeness of a set of requirements: an SRS document is complete if there is no missing functionality, that is, all appropriate desirable and undesirable behaviors are specified. Recall from Figure 1.2 that there is usually a mismatch between desired behaviors and specified behaviors— there is always some unspecified behavior, as well as undesirable behavior, that finds its way into the system that should be explicitly prohibited. Either case can lead to literal requirements satisfaction but not customer satisfaction.
Completeness is a difficult quality to prove for a set of requirements. If a single requirement contains “to be defined” (TBD) or some variation of this phrase, then clearly the requirement is incomplete. And if the requirement is missing measurable indicators of satisfaction, then that is a problem of incompleteness. But if those indicators are absent, how do you know when something is missing in a requirement specification? Use the following techniques to look for missing requirements:
- Check if you have received requirements from all your product’s user classes.
- Make sure that the source and usage of all data items are stated.
- Check whether requirements are present in all pertinent functional categories for the system. These categories might include reporting, managing, and customizing users, edit operations, security, printing, and transaction logging, or whatever functional areas your system typically includes.
- Check whether NFRs, such as quality attributes and design and implementation constraints, have been specified.
- Ensure that the requirements conform to all applicable regulations.
- Build tables of similar requirements that fit a pattern to avoid duplications or oversights.
- Represent requirements information in multiple ways. Models such as UML provide a high-level view and can help in catching missing use cases and requirements.
Consistency
Since requirements may be added to the project at different times and come from different sources, they are vulnerable to become inconsistent. Figure 6.3 is a taken picture from corner streets in downtown Montreal, Canada. It shows multiple signs added a year to year to explain the parking rules on that corner. As these signs were added over time, they collectively began contradicting one other. Instead, this forest of signs could be simplified. Everyone should be able to figure out within a few seconds, “Can I park here now, or a little bit later, or for how long?” Can you reduce this hodgepodge of signs into a single, consistent one?
Figure 6.3 Multiple signs can create contradicting parking rules. (Photo taken from downtown Montreal, Canada, M. Kassab.)
In the context of the SRS document, the consistency can take two forms:
- Internal Consistency : that is, the satisfaction of one requirement does not preclude the satisfaction of another.
- External Consistency : that is, the SRS is in agreement with all other applicable documents and standards.
Here is a simple example of illustrating an internal inconsistency. The following are requirements for some kind of pneumatic control system, possibly relating to the baggage handling system.
- 3.1 If the lever is in position 1, then valve 1 is opened.
- 3.2 If the lever is in position 1, then valve 1 is closed.
Clearly, requirements 3.1 and 3.2 are inconsistent and therefore invalid—when the lever is in position 1, the valve cannot be both open and closed at the same time. More complex consistency checking will be discussed in Chapter 7 .
When either internal or external inconsistency is present in the SRS, it can lead to difficulties in meeting requirements, delays, and frustration downstream. Internal and external consistency can be checked through reviews, viewpoint resolution, various formal methods, and prototyping.
Verifiability
An SRS is verifiable if satisfaction of each requirement can be established using measurement or some other unambiguous means. This quality is important because a requirement that cannot be shown to be met has not been met. When requirements cannot be measured, they cannot be met and disputes will follow.
As we discussed in Chapter 5 , NFRs are the most vulnerable to be written in an unverifiable format. For example, consider the following usability requirement:
The system shall be reliable
Clearly, the satisfaction of this requirement can’t be demonstrated as it is subjective and what could be reliable for one user may not be reliable enough for another. One way to improve the above requirement is by associating metrics to quantify how the acceptance of “reliability” will be measured. We will discuss the Importance of Measurement in Requirements V&V shortly.
Overall, verifiability can be explored through various reviews, through test-case design (design-driven development), and through viewpoint resolution.
Traceability
Traceability, defined as “the ability to describe and follow the life of a requirement in both a forwards and backwards direction” from inception throughout the entire system’s life cycle, provides useful support mechanisms for managing requirement changes during the ongoing change process ( Gotel 1995 ). Moreover, the extent to which traceability is exploited is viewed as an indicator of system quality and process maturity and is mandated by many standards. In Aizenbud-Reshef et al. ( 2006 ), the specific challenges faced in state-of-the-art traceability practice are described in more detail.
In general, an SRS is traceable if each requirement is clearly identifiable, and all linkages to other requirements (e.g., dependencies, subordinate, and predominant) are clearly noted. In some cases, the relationship is clear in the hierarchy of the numbering system. Traceability matrices, to be discussed shortly, are also designed for this purpose. In other cases, the linkages are made by requirements tools.
Traceability is an essential quality for effective communications about requirements, facilitating easy modification, and even for legal considerations. For example, in the case of a dispute, it is helpful to show that responsible linking of related requirements was done.
In practice, many organizations either focus their traceability efforts on functional requirements or else fail entirely to implement an effective traceability process. Tracing NFRs has, on the whole, been neglected. As we discussed in Chapter 5 , this is mainly because NFRs tend to become scattered among multiple modules when they are mapped from the one-dimensional requirements domain to the n-dimensional solution space. Furthermore, NFRs can often interact in the sense that attempts to achieve one NFR can help or hinder the achievement of other NFRs at certain functionality. Such interaction creates an extensive network of interdependencies and trade-offs between NFRs which is not easy to trace. Although prior work on tracing NFRs has been rather limited, a number of traceability approaches have in fact been developed to support related activities while incorporating NFRs in software engineering processes.
In Chung et al. ( 1995 ), the authors adopt the NFR framework we explained in Chapter 5 to show how a historical record of the treatment of NFRs during the development process can also serve to systematically support the evolution of the software system. The authors treat changes in terms of (i) adding or modifying NFRs, or changing their relative importance, and (ii) changing design decisions or design rationale. While this study has provided some support for extensions to the NFR framework, particularly in representing changes to goal achievement strengths, the impact of changes to functional models on nonfunctional models, and vice-versa, has not been discussed.
In Cleland-Huang ( 2005 ), the author proposed an approach named Goal Centric Traceability, a holistic traceability environment that provides systems analysts with the means to manage the impact of functional change on NFRs. Nevertheless, the impact of changes to an NFR on other NFRs and the functional model is not solved with this solution.
In Kassab et al. ( 2008 ) a traceability metamodel for change management of NFRs is presented to tackle the traceability problem for NFRs.
Traceability can be measured using network-like analyses. For example, we could count the efferent (inward) and afferent (outward) coupling as indicated by the key phrases “uses,” “is referenced by,” “references,” “is used by,” and so on.
Group reviews and inspections and automated tools can also be used to check for traceability between requirements to/from tests. We will discuss traceability further in Chapter 9 .
Ranking
The IEEE 29148 standard does not mandate requirements ranking, but the authors think the ranking of requirements is essential. A requirements set is ranked if the items are prioritized for importance and/or stability. “Importance” is a relative term, and its meaning needs to be resolved on a case-by-case basis. Stability means the likelihood that the requirement would change. For example, a hospital information system will always have doctors, nurses, and patients (but governing legislation will change). The ranking could use a numerical scale (positive integers or real numbers) and a simple rating system (e.g., mandatory, desirable, and optional), or could be ranked by mission criticality.
For example, NASA uses a four-level ranking system. Level 1 requirements are mission-level requirements that are very high level and that very rarely change. Level 2 requirements are “high level” with minimal change. Level 3 requirements are those requirements that can be derived from level 2 requirements, that is, each level 2 requirement traces to one or more level 3 requirements. Contracts usually bid at this level of detail. Finally, level 4 are detailed requirements and are typically used to design and code the system ( Wilson et al. 1997 ).
The ranking is an extremely important quality of an SRS document. Suppose in the course of system design, two requirements cannot be met simultaneously. It becomes easier to decide which requirement to relax based on its ranking. In addition to being useful for trade-off engineering, ranking can be used for cost estimation and negotiation, and for dispute resolution. Ranking validation is easy enough through reviews and viewpoint resolution (to agree upon the rankings).
Example Validation of Requirements
Consider requirements 5.1.1–5.1.18 for the smart home SRS found in Appendix A. Now we list the IEEE 29148 criteria and evaluate the requirements along these criteria.
Singular
There is at least one possible violation. Consider the following requirement:
- 5.2.1 Smart home shall have at least one multipurpose detector for detecting smoke and carbon monoxide on each floor.
It contains a conjunction and could be separated into two identical requirements except for one detecting smoke, and the other detecting carbon monoxide. But the requirement also states that the detector is “multipurpose” so it is expected that more than one thing is to be detected.
There are other similar instances throughout the specification, but none seem to introduce ambiguity.
Feasible
The requirements are feasible as they appear to be consistent with a common understanding of how television recording works in a home environment. But it would be hard to be certain if this set is correct without further analysis using techniques such as focus groups and experts.
Unambiguous
There are quite a few unclear or ambiguous phrases in these requirements that are revealed by asking “how do I test this?” These problems will need to be resolved. For example, 8.1.1 says that the system shall record “any show on television.” There are many problems with this statement: any show on United States television or around the world? What about pay-per-view, and so on? Requirement 8.1.4 says the system shall “make storage” for recorded shows “expandable.” What does making storage mean (allocation)? How much expansion should be allowed? Requirement 8.1.6 talks about searching—but based on what? Program name, the time it was recorded, subject? Requirement 8.1.10 describes selecting “quality for recording.” What does “quality” mean? Requirement 8.1.12 mentions storing “X episodes.” Is “X” a natural number, an integer, a complex number, a quaternion? There are other ambiguities here too.
Complete
The individual requirements could bear some improvement. For example, for smoke and carbon monoxide detection, “dangerous levels” are mentioned. These should be stated as measurable targets derived from some standard or regulation.
As a set, while there are no TBD requirements in the document, we cannot really say if this set of requirements is complete without using such validation techniques as QFD or focus groups.
Consistent
Without conducting a formal consistency analysis, we cannot be sure. For this segment of requirements, however, it probably wouldn’t be too hard since the “shall” statements are relatively straightforward. So, although there would be a large number of logical variables, there would not be many compound propositions to evaluate. You can use automatic consistency checkers to validate this segment of requirements, or you could actually use a spreadsheet program to do the job. However, in this situation, an informal reading is probably adequate. An informal reading of the requirements does not reveal any obvious inconsistencies.
Verifiable
Because of the aforementioned ambiguities, these requirements are not fully verifiable.
Traceable
The requirements are numbered in a way that appears to be consistent. There are no internal references or usages of one requirement to another in this set.
Ranked
We know from reading the opening paragraphs of Section 8 of the SRS that this set of requirements is ranked as “medium” in importance. Ranking a large cluster of requirements as having the same priority does not particularly help; however, when the need arises to sacrifice some requirements in order to meet budget and/or schedule, it would be better if each major requirement were individually ranked.
The Importance of Measurement in Requirements V&V
Imagine an argument involving the question of which boxer was better: Muhammad Ali or Joe Louis? All kinds of strategies have been tried to settle this argument. For example, you can try to argue superiority based on particular fighting characteristics. Some have modeled these characteristics to create computer-simulated fights. Others have looked at the fighting characteristics and results against similar opponents. You could even compare training techniques and the quality of their managers, trainers, and promoters. But there is no conclusive evidence that one fighter was better than the other or that they were evenly matched because there are no direct metrics available to make such a judgment.
Now consider an argument involving who is the best long jumper of all time. The answer should be easy—Mike Powell, who set the record at 8.95 m (with no wind at his back) in 1991. No one has ever jumped farther, and he broke Bob Beamon’s record, which stood for 23 years. You can try to argue that Beamon was better in terms of other characteristics—competitive spirit, tenacity, resiliency, sportsmanship, etc., but those are all unmeasurable.
Now imagine an argument with a customer involving whether or not a requirement that “the software shall be easy to use” was met or not. You contend that the requirement was met because “everyone says that the software is easy to use.” The customer disagrees because she feels that “the software is too hard to use.” But you can’t settle the argument because you have no metrics. It is rather disappointing that as software engineers we are no better off than two boxing fans arguing from barstools ( Laplante et al. 2007 ).
So which qualities or “ilities” can be measured? There are many possibilities.
- Accuracy
- Completeness
- Consistency
- Correctness
- Efficiency
- Expandability
- Interoperability
- Maintainability
- Manageability
- Portability
- Readability
- Reusability
- Reliability
- Safety
- Security
- Survivability
- Testability
- Understandability
- Usability
This is not an exhaustive list. The ilities generate a set of nonfunctional requirements, and for each of these requirements, there needs to be an associated metric to determine if the requirement has been met. Associating a metric to the itility should be considered with diligence to ensure that the overall meaning of the requirement is what is really intended. Consider for example the following requirement statement:
The system shall not lose track of too much baggage.
Obviously, this requirement is flawed. One may argue that a better reworked version would be:
The system shall be able to know the location of 99.99% of all baggage identified by users.
Now, consider what will happen if the system knows the location of 99.999% of the baggage identified? This means the above requirement is not satisfied. The requirement should have used the term “at least” to make it more inclusive. Also to be able to verify the above requirement, we need to measure it against certain duration. So, the requirement should state that “The system shall be able to know the location of at least 99.99% of all baggage identified by users within each X time period (or maybe for each flight)”; otherwise, how would we be able to verify it?
Goal/Question/Metric Analysis
We previously mentioned the importance of uncovering stakeholder goals in Chapter 2 and the use of goal-based analysis for requirements V&V in Chapter 3 . But how can we generate the metrics that we need? The goal/question/metric (GQM) paradigm is an analysis technique that helps in the selection of an appropriate metric.
To use the technique, you have to follow three simple rules. First, state the goals of the measurement, that is, “what is the organization trying to achieve?” Next, derive from each goal the questions that must be answered to determine if the goals are being met. Finally, decide what must be measured in order to be able to answer the questions ( Basili et al. 1994 ).
Here is an example of using GQM to define metrics that are “useful.” Suppose that the stated goal for the system is “The system shall be easy to use.” Clearly “easy to use” is impossible to objectively measure. So how do we approach its measurement? We can do it by creating questions that help describe what “easy to use” means. For example, one question that fits this description is “How many expert, intermediate, and novice users use the system?” The rationale for this question is that an easy-to-use system should be used by everyone. Now we need to know an appropriate metric to answer this question. Here is one way to obtain that metric— provide the system in an open lab for a period of time and measure the number and percentage of each user type who uses the system during that time. If a disproportionate number of users are expert, for example, then it may be concluded that the system is not easy to use. If an equal proportion of expert, intermediate, and novice users use the system, then it might be that the system is “easy to use.”
Consider another question that addresses the goal of “easy to use”: How long does it take a new user to master features 1–25 with only 8 hours of training? The rationale is that certain minimum features needed to use the system adequately ought not to take too long to train. An associated metric for this question then is obtained by taking a random sample of novice users, giving them the same 8 hours of training, and then testing the students to see if they can use features 1–25 to some minimum standard.
Following such a process to drive questions and associated metrics from goals is a good path to deriving measurable requirements and at the same time helping to refine and improve the quality of the requirements themselves.
VIGNETTE 6.1 Validation and Verification
Consider the following requirement for an autonomous passenger car:
3.1.1 THE VEHICLE SHOULD NOT BE CAPABLE OF FORWARD MOVEMENT UNLESS A PERSON IS IN THE DRIVERS’ SEAT FOR AT LEAST −10 SECONDS
This requirement contains four errors, one grammatical, one conceptual, one logical, and one mathematical. The grammatical error is that the word “drivers” should be replaced with “driver’s” since there is only one driver’s seat. The logical error arises from the fact that not only should forward movement be prohibited without an operator, but all movement—forward, backward, and any other that the vehicle might be capable of. The conceptual (validation) error is that the word “should” needs to be replaced with “shall” since it is a safety risk if the vehicle is capable of movement without an operator in a position to override the autonomous system if necessary, and therefore, this requirement is not optional. The mathematical error is that −10 seconds was intended to be 10 seconds. An improved version of this requirement is:
3.1.2 THE VEHICLE SHALL NOT BE CAPABLE OF MOVEMENT UNLESS A PERSON IS IN THE DRIVERS’ SEAT FOR AT LEAST 10 SECONDS
Clearly, we want to have a set of techniques that can identify all of these types of errors. This is why one form of verification and/or validation is generally insufficient, particularly for critical systems.
NASA Requirements Testing
One would think that the American space agency NASA is a place where rigorous requirements engineering is conducted. This is a correct assumption. Given that NASA is engaged in the engineering of very high profile, high-cost, and, most importantly, life-critical systems, the techniques used and developed here are state of the art. Table 6.5 contains an excerpt from NASA Procedural Requirements for requirements engineering (which is now obsolete but still useful for illustrative purposes) ( NASA 2008 ).
|
Source: Adapted from NASA (National Aeronautics and Space Administration). (2008). Assurance Process for Complex Electronics. Updated 28 January 2008.
Note: A verification matrix supports the accomplishment of this requirement.
NASA is heavily invested in the use of formal methods for requirements verification and validation, and a number of techniques and tools for this purpose have been developed.
Note that verification matrices are specifically mentioned as helping to accomplish the software requirements engineering goals. Requirements management, which will be discussed in Chapter 10 , is specifically mentioned in the directive.
NASA ARM Tool
Quick Access to: NASA ARM Tool
The NASA ARM tool is a good example of a natural language analyzer that had moderate success in government and industrial use. ARM was developed at NASA’s Software Assurance Technology Center at Goddard Space Flight Center in Greenbelt, MD, in the late 1990s. NASA ceased supporting ARM and a successor tool, e-Smart, sometime around 2009. Still, the tool is worth studying because it highlights several key points about the careful use of language and well-structured requirements specifications. In addition, one of the author’s students reconstructed ARM for classroom and experimental use ( Carlson and Laplante 2014 ). The tool can be accessed at http://arm.laplante.io/ .
Here is how ARM works. The tool conducts an analysis of the text of the SRS document and reports certain metrics. The metrics are divided into two categories: micro- and macro-level metrics. Micro-level indicators count the occurrences of specific keyword types. Macro-level indicators are coarse-grained metrics of the SRS documentation.
Micro-level indicators include:
- Imperatives
- Continuances
- Directives
- Options
- Weak phrases
Macro-level indicators include:
- Size of requirements
- Text structure
- Specification depth
- Readability
These micro- and macro-level indicators will be described in some detail.
In addition, various ratios can be computed using macro- and micro-level indicators. No particular thresholds for the metrics are given (research is still being conducted in this regard). However, at the end of this section, summary metrics for 56 NASA projects are given for comparison.
A description of the metrics and some excerpts from the ARM report for creating the Smart Home SRS document are found in the appendix. The definitions are derived from those reported by the tool and described by the authors of the tool in a related report ( Hammer et al. 1998 ).
Imperatives
The first metric, imperatives, is a micro-indicator that counts the words and phrases that command that something must be provided. Imperatives include “shall,” “will,” “must,” and others as described in Table 4.2 .
A more precise specification will have a high number of “shall” or “must” imperatives relative to other imperative types. Note that the word “should” is not recommended for use in an SRS. From both a logical and a legal point of view, “should” places too much discretion in the hands of system designers.
The counts of imperatives found in the Smart Home SRS document are shown in Table 6.6 .
| Imperatives | Occurrences |
| Shall | 308 |
| Must | 0 |
| is required to | 0 |
| are applicable | 0 |
| are to | 1 |
| responsible for | 0 |
| will | 51 |
| should | 7 |
| Total | 367 |
An excerpt of the imperatives captured from the ARM output is shown in Figure 6.4 .
Figure 6.4 Excerpt of ARM output for Smart Home requirements specification document.
Continuances
Continuances are phrases that follow an imperative and precede the definition of lower-level requirement specifications. Continuances indicate that requirements have been organized and structured. Examples of and counts of continuances found in the Smart Home SRS document are shown in Table 6.7 . The symbol “:” is treated as a continuance when it follows an imperative and precedes a requirement definition. These characteristics contribute to the ease with which the requirement specification document can be changed. Too many continuances, however, indicate multiple, complex requirements that may not be adequately reflected in resource and schedule estimates.
Table 6.7 ARM Counts for Continuances in the Smart Home SRS Document | Continuance | Occurrence | | --- | --- | | Below | 0 | | as follows | 0 | | following | 0 | | Listed | 0 | | in particular | 0 | | support | 0 | | and | 85 | | : | 2 | | Total | 87 |
Directives
The micro-indicator “directives” count those words or phrases that indicate that the document contains examples or other illustrative information. Directives point to information that makes the specified requirements more understandable. Typical directives and their counts found in the Smart Home SRS document are shown in Table 6.8 . Generally, the higher the number of total directives, the more precisely the requirements are defined.
Table 6.8 Directives Found in the Smart Home SRS Document | Directive | Occurrence | | --- | --- | | e.g. | 0 | | i.e. | 14 | | For example | 0 | | Figure | 0 | | Table | 0 | | Note | 0 | | Total | 14 |
Options
Options are those words that give the developer latitude in satisfying the specifications. At the same time, options give less control to the customer. Options and their counts found in the Smart Home SRS document are shown in Table 6.9 .
| Option Phrases | Occurrence |
| Can | 7 |
| May | 23 |
| Optionally | 0 |
| Total | 30 |
Weak Phrases
Weak phrases are clauses that are subject to multiple interpretations and uncertainty and therefore can lead to requirements errors. The use of phrases such as “adequate” and “as appropriate” indicates that what is required is either defined elsewhere or worse the requirement is open to subjective interpretation. Phrases such as “but not limited to” and “as a minimum” provide the basis for expanding requirements that have been identified or adding future requirements. The counts of weak phrases for the Smart Home SRS document are shown in Table 6.10 .
| Weak Phrase | Occurrence |
| Adequate | 0 |
| as appropriate | 0 |
| be able to | 3 |
| be capable of | 0 |
| capability of | 0 |
| capability to | 0 |
| Effective | 0 |
| as required | 0 |
| Normal | 1 |
| provide for | 1 |
| Timely | 0 |
| easy to | 1 |
| Total | 6 |
The total number of weak phrases is an important metric that indicates the extent to which the specification is ambiguous and incomplete.
Incomplete
The “incomplete” micro-indicator counts words that imply that something is missing in the document, for whatever reason (e.g., future expansion and undetermined requirements). The most common incomplete notation is TBD for “to be determined.”
Variations of TBD include:
- TBD : to be determined
- TBS : to be scheduled
- TBE : to be established, or yet to be estimated
- TBC : to be computed
- TBR : to be resolved
- “Not defined” and “not determined” explicitly state that a specification statement is incomplete.
- “But not limited to” and “as a minimum” are phrases that permit modifications or additions to the specification.
Incomplete words and phrases found in the Smart Home SRS document are shown in Table 6.11 .
| Incomplete Term | Occurrence |
| TBD | 0 |
| TBS | 0 |
| TBE | 0 |
| TBC | 0 |
| TBR | 0 |
| not defined | 0 |
| not determined | 0 |
| but not limited to | 0 |
| as a minimum | 0 |
| Total | 0 |
Leaving incompleteness in the SRS document is an invitation to disaster later in the project. While it is likely that there may be a few incomplete terms in a well-written SRS due to pending requirements, the number of such words should be kept to an absolute minimum.
Subjects
Subjects are a count of unique combinations of words immediately preceding imperatives in the source file. This count is an indication of the scope of subjects addressed by the specification.
The ARM tool counted a total of 372 subjects in the Smart Home SRS document in Appendix A.
Specification Depth
Specification depth counts the number of imperatives at each level of the document and reflects the structure of the requirements. The topological structure of requirements was discussed in Chapter 4 . The numbering and specification structural counts for the Smart Home SRS document as computed by the NASA ARM tool are provided in Table 6.12 .
| Numbering Structure | Specification Structure | ||
| Depth | Occurrence | Depth | Occurrence |
| 1 | 19 | 1 | 0 |
| 2 | 71 | 2 | 50 |
| 3 | 265 | 3 | 258 |
| 4 | 65 | 4 | 64 |
| 5 | 0 | 5 | 0 |
| 6 | 0 | 6 | 0 |
| 7 | 0 | 7 | 0 |
| 8 | 0 | 8 | 0 |
| 9 | 0 | 9 | 0 |
| Total | 420 | Total | 372 |
These counts indicate that the SRS requirements hierarchy has a “diamond” shape in the manner of Figure 4.3c .
Readability Statistics
In Chapter 4 , we discussed the importance of clarity in the SRS document. There are various ways to evaluate reading levels, but most techniques use some formulation of characters or syllables per words and words per sentence. For example, the Flesch Reading Ease index is based on the average number of syllables per word and of words per sentence. Standard writing tends to fall in the 60–70 range, but apparently a higher score increases readability.
The Flesch–Kincaid grade level index is supposed to reflect a grade-school writing level; therefore, a score of 12 means that someone with a 12th-grade education would understand the writing. But standard writing averages seventh to eighth grade, and a much higher score is not necessarily good—higher-level writing would be harder to understand. The Flesch–Kincaid grade level indicator is also based on the average number of syllables per word and on words per sentence. There are other grade level indicators as well ( Wilson et al. 1997 ).
The NASA ARM tool does not provide the ability to count these metrics, but most versions of the popular Microsoft Word can provide at least some relevant statistics. For example, the version of Word 2007 used to prepare this manuscript will compute various words, characters, paragraphs, sentence counts, and averages. It will also compute the Flesch Reading Ease and Flesch–Kincaid grade level metrics (consult the user’s manual or online help feature to determine how to compute such metrics for your word processor, if available). In any case, we used Word to calculate the statistics for the Smart Home SRS document and obtained the output shown in Figure 6.5 .
Figure 6.5 Readability statistics for Smart Home SRS document obtained from Microsoft Office Word.
The SRS document is assessed to be at a 12th-grade reading level. The low number of sentences per paragraph (1.2) is an artifact of the way the tool counted each numbered requirement as a new paragraph.
Summary of NASA Metrics
To get some sense of proportion and relevance to the ARM indicators, Wilson et al. ( 1997 ) studied 56 NASA software systems ranging in size from 143 to 4,772 lines of code. They used their tool to collect statistics about these systems, which are summarized in Table 6.13 .
| Lines of Text | Imperatives | Continuances | Directives | Weak Phrases | TBD, TBS, TBR | Option (can, may…) | |
| Minimum | 143 | 25 | 15 | 0 | 0 | 0 | 0 |
| Median | 2,265 | 382 | 183 | 21 | 37 | 7 | 27 |
| Average | 4,772 | 682 | 423 | 49 | 70 | 25 | 63 |
| Max | 28,459 | 3,896 | 118 a | 224 | 4 a | 32 | 130 |
| Std Dev | 759 | 156 | 99 | 12 | 21 | 20 | 39 |
| Level 3 Specs | 1,011 | 588 | 577 | 10 | 242 | 1 | 5 |
| Level 4 Specs | 1,432 | 917 | 289 | 9 | 393 | 2 | 2 |
Source: Wilson, W.M., et al., Automated analysis of requirement specifications, in Proceedings of the 19th International Conference on Software Engineering , pp. 161–171, 1997.
a These two figures are clearly wrong—how can the maximum numbers be less than the averages? However, all instances of this table in the literature show the same error, and the authors have been unable to obtain the correct ones.
From Table 6.12 , we note that one specification was only 143 lines of text and that the longest was 28,000 lines of text. It is interesting to note from Table 6.12 that even NASA specifications have “TBDs” and often many “options.” The property of feasible is not listed in the table, and modifiable, validatable, and verifiable are three additional properties ( Wilson et al. 1997 ).
Aside from the obvious interpretations, why are these ARM indicators important? Table 6.14 gives us the intriguing answer—because there is a correlation between these indicators and the IEEE 29148 qualities.
Table 6.14 Cross Reference of NASA Indicators to the IEEE 29148 Qualities | Categories of Quality Indicators | | --- | | Indicators of Quality Attributes | | --- | | Quality Attributes | | --- | | Complete | Consistent | Correct | Modifiable | Ranked | Testable | Traceable | Unambiguous | Understandable | Validatable | Verifiable | | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | | Imperatives | x | | | x | | | x | x | x | x | x | | Continuances | x | | | x | x | x | x | x | x | x | x | | Directives | x | | x | | | x | | x | x | x | x | | Options | x | | | | | x | | x | x | x | | | Weak phrases | x | | x | | | x | | x | x | x | x | | Size | x | | | | | x | | x | x | x | x | | Text structure | x | x | | x | x | | x | | x | | x | | Specification depth | x | x | | x | | | x | | x | | x | | Readability | | | | x | | x | x | x | x | x | x |
Source: Adopted from Wilson, W.M., et al., Automated analysis of requirement specifications, in Proceedings of the 19th International Conference on Software Engineering , pp. 161–171, 1997.
Looking at the table, it seems that the text structure and depth are indicators of internal consistency (but not external). The numbers of directives and weak phrases are correlated (positively and negatively, respectively) with correctness. All of the micro-indicators are linked to testability (both in a positive and negative correlation—you need “just enough” directives but not too many). Finally, all quality indicators (except for readability) contribute to completeness.
NASA supported the ARM tool for several years, but by 2012 the tool was no longer available. A functionally equivalent reconstruction of the tool was developed by Carlson and Laplante ( 2014 ) and is available for classroom use at the first author’s website ( https://arm.laplante.io/) .
VIGNETTE 6.2 NASA Assurance Process for Complex Electronics
NASA’s Assurance Process for Complex Electronics Life Cycle Activities prescribes an assurance process for each phase of the project plan. In the requirements phase, the same process is used for all systems, subsystems, and safety requirements (note that safety requirements are treated separately). This assurance process comprises the risk management process.
The requirement elicitation process described is waterfall in nature and incorporates the following steps:
- Derivation of requirements from higher-level requirements
- Capture of additional requirements and constraints
- Feasibility assessment
The parallel risk analysis and process include:
- Assessment of derivation/ensuring all requirements are captured
- Evaluation of requirements
- Risk analysis
The output of this process is a set of risk assessed and managed requirements that are baselined and under configuration control (NASA).
Exercises
- 6.1 What can be some pitfalls to consider when ranking requirements?
- 6.2 Describe two different ways to identify ambiguity in an SRS.
- 6.3 Which of the IEEE Standard qualities for individual requirements seem most important? Can you rank these?
- 6.4 Conduct an informal assessment of the IEEE 29148 qualities for the SRS given in Appendix B.
- 6.5 For an available SRS document, conduct an informal assessment of its IEEE 29148 qualities.
- 6.6 Should implementation risk be discussed with customers?
- 6.7 What are the advantages and risks of having requirements engineering conducted (or assisted) by an outside firm or consultants?
-
6.8 Create a traceability matrix for the SRS in
- 6.1.1 Appendix A
- 6.1.2 Appendix B
- 6.9 Calculate the requirements per test and tests per requirements metrics for the data shown in Table 6.3 . Do you see any inconsistencies?
-
6.10 Consider the requirements in the SRS of Appendix A.
- 6.10.1 Which of these could be improved through the use of visual formalisms such as various UML diagrams?
- 6.10.2 Select three of these and create the visual formalism.
- 6.11 The requirements in Appendix B are not ranked. Using reasonable assumptions, rank these requirements (use a requirements ranking matrix for brevity).
- 6.12 Why is the NASA ARM tool, and others like it, useful in addition to objective techniques of SRS risk mitigation?
- 6.13 Run the NASA ARM tool (found at arm.laplante.io ) on an available SRS document. What can you infer from the results?
- 6.14 Convert the collection of signs in Figure 6.3 into a single, consistent sign. If signs are not consistent then prove it (you can use Google translate to convert the French into English).
- *6.15 Reconstruct the ARM tool in your favorite programming language. Note that the generation of the statistics is relatively simple—the challenge is in parsing the SRS document ( Carlson and Laplante 2014 ). Place restrictions on the input to the tool as needed.
Supplemental Materials from the authors on requirements validations and verifications
https://phil.laplante.io/requirements/requirementsVV.php
Note
- A variation of this story first appeared in Voas and Laplante ( 2010 ).
References
- Aizenbud-Reshef , N., Nolan, B. T., Rubin, J., & Shaham-Gafni, Y. (2006). Model traceability. IBM System Journal , 45(3): 515–526.
- Arora , C., Sabetzadeh, M., Briand, L., & Zimmer, F. (2015). Automated checking of conformance to requirements templates using natural language processing. IEEE Transactions on Software Engineering , 41(10): 944–996.
- Bahill , T. A., & Henderson, S. J. (2005). Requirements development, verification, and validation exhibited in famous failures. Systems Engineering , 8(1): 1–14.
- Basili , V., Caldiera, G., & Rombach, H. D. (1994). Goal question metric approach. In J. J. Marciniak (Ed.), Encyclopedia of Software Engineering (pp. 528–532). Wiley, New York.
- Boehm , B. W. (1984). Verifying and validating software requirements and design specifications. IEEE Software , 1(1): 75–88.
- Carlson , N., & Laplante, P. (2014). The NASA automated requirements measurement tool: A reconstruction. Innovations in Systems and Software Engineering , 10(2): 77–91.
- Chung , L., Nixon, B. A., & Yu, E. (1995). Using non-functional requirements to systematically support change. Proceedings of the Second IEEE International Symposium on Requirements Engineering (pp. 132–139). York.
- Cleland-Huang , J. (2005). Toward improved traceability of non-functional requirements. Proceedings of the 3rd International Workshop on Traceability in Emerging Forms of Software Engineering (pp. 14–19). Long Beach, CA.
- Fagan , M. E. (1986). Advances in software inspections. IEEE Transactions on Software Engineering , 12(7): 744–751.
- Femmer , H., Fernández, D. M., Juergens, E., Klose, M., Zimmer, I., & Zimmer, J. (2014, June). Rapid requirements checks with requirements smells: Two case studies. In Proceedings of the 1st International Workshop on Rapid Continuous Software Engineering (pp. 10–19). ACM, Hyderabad, India.
- Gervasi , V., & Nuseibeh, B. (2002). Lightweight validation of natural language requirements. Software: Practice and Experience , 32(2): 113–133.
- Gilb , T. (2005). Competitive Engineering: A Handbook for Systems Engineering, Requirements Engineering, and Software Engineering Using Planguage . Butterworth-Heinemann, Oxford.
- Gotel , O. C. Z. (1995). Contribution Structures for Requirements Traceability , Doctoral dissertation, University of London, London, UK..
- Hammer , T. F., Huffman, L. L., Rosenberg, L. H., Wilson, W., & Hyatt, L. (1998). Doing requirements right the first time. CROSSTALK The Journal of Defense Software Engineering , 1: 20–25.
- Hetzel , B. (1988). The Complete Guide to Software Testing , 2nd edition. QED Information Sciences, Inc., London.
- IEEE Std 1012-2012, IEEE Standard for Software Verification and Validation . (2004). Institute for Electrical and Electronics Engineers, Piscataway, NJ.
- ISO/IEC/IEEE Std 29148, Systems and Software Engineering—Life Cycle Processes—Requirements Engineering . (2011). IEEE, Piscataway, NJ.
- Kassab, M., & Laplante, P. (2022). The current and evolving landscape of requirements engineering state of practice. IEEE Software . DOI: 10.1109/MS.2022.3147692 .
- Kassab , M., Ormandjieva, O., & Daneva, M. (2008). A traceability metamodel for change management of non-functional requirements. In 2008 Sixth International Conference on Software Engineering Research, Management and Applications (pp. 245–254). IEEE, Prague, Czech Republic.
- Lami , G. (2005). QuARS: A Tool for Analyzing Requirement (CMU/SEI-2005-TR-014) . Software Engineering Institute, Carnegie Mellon University. http://resources.sei.cmu.edu/library/asset-view.cfm?AssetID=7681 (accessed 7 January 2017).
- Laplante , P. A. (2010). Stakeholder analysis for smart grid systems. In IEEE Reliability Society Annual Technical Report . http://rs.ieee.org/images/files/Publications/2010/2010-02.pdf (accessed June 2017).
- Laplante , P. A., Agresti, W. W., & Djavanshir, G. R. (2007). Guest editor’s introduction, special section on IT quality enhancement and process improvement. IT Professional , 9: 10–11.
- Menzel , I., Mueller, M., Gross, A., & Doerr, J. (2010). An experimental comparison regarding the completeness of functional requirements specifications. In 2010 18th IEEE International Requirements Engineering Conference (RE ) (pp. 15–24). IEEE, Sydney, NSW.
- NASA (National Aeronautics and Space Administration). (2008). Assurance Process for Complex Electronics . Updated 28 January 2008. https://www.hq.nasa.gov/office/codeq/software/ComplexElectronics/l_requirements.htm (accessed January 2016).
- O’Neil , R. (2004). Pennsylvania’s “No Jake Braking” Signs . OLR Research Report #004-R-0515. http://www.cga.ct.gov/2004/rpt/2004-R-0515.htm (accessed March 2013).
- Voas , J., & Laplante, P. (2010). End brake retarder prohibitions: Defining “shall not” requirements effectively. Computer , 12(3): 46–53.
- Wilson , W. M., Rosenberg, L. H., & Hyatt, L. E. (1997). Automated analysis of requirement specifications. In Proceedings of the 19th International Conference on Software Engineering (pp. 161–171). Boston, Massachusetts, USA.