DOI: 10.1201/9781003129509-4

Requirements Agreement and Analysis

Throughout the elicitation activity and especially before finalizing the systems requirements specification, raw requirements should be analyzed for problems and these problems reconciled. Requirements analysis is the activity of analyzing requirements for problems. Problematic requirements include those that are:

  • Confusing
  • Extraneous
  • Duplicated
  • Conflicting
  • Missing

We make these concepts more rigorous in Chapter 6 .

Requirements analysis is usually informal; for example, customers and stakeholder representatives are shown elicited requirements in a format that they can understand to ensure that the requirements engineer’s interpretation of all customers’ desiderata is correct. Formal methods provide more rigorous techniques for requirements analysis.

Requirements agreement is the process of reconciling differences in the same requirement derived from different sources. Requirements agreement is generally an informal process, though a systematic process should be used. Use cases and user stories are often effective tools for this purpose ( Hull et al. 2011 ). Screen mockups are another useful technique, especially when used in conjunction with functional prototypes ( Ricca et al. 2010 ). Others suggest using scenarios, storyboards, paper prototypes, scripted concept generators, and functional prototypes for requirements agreement ( Sutcliffe et al. 2011 ).

As part of the customer agreement process, Hull et al. ( 2011 ) suggest asking the following questions:

  • Is the requirement complete?
  • Is the requirement clear?
  • Is the requirement implementable?
  • Is the qualification plan clear and acceptable?

You will note in Chapter 6 how these questions relate to the desirable qualities of a requirements specification, and we will look at more precise ways to achieve these qualities throughout the requirements engineering life cycle in Chapters 6 and 7 .

Requirements Representation

Various techniques can be used to describe functionality in any system, including use cases, user stories, natural languages, formal languages, stylized (restricted natural) languages, and a variety of formal, semiformal, and informal diagrams. Eberlein and Jiang ( 2011 ) provide a focused discussion of selecting various requirements techniques including specification approaches. When making such selections, they suggest considering the following factors:

  • Technical issues such as the maturity and effectiveness of the technique being considered
  • The complexity of the techniques
  • Social and cultural issues such as organization’s opposition to change
  • The level of education and knowledge of developers

Certain characteristics of the software project such as time and cost constraint the complexity of the project, and the structure and competence of the software team.

Selecting the right representation style for a single project or organization-wide use is a significant challenge, and in a sense, a theme of this book.

Approaches to Requirements Representation

Generally, there are three forms of requirements representation: formal, informal, and semiformal. Requirements specifications can strictly adhere to one or another of these approaches, but usually they contain elements of at least two of these approaches (informal and one other).

  • Informal Representation techniques cannot be completely transliterated into a rigorous mathematical notation. Informal techniques include natural language (i.e., human languages), flowcharts, ad hoc diagrams, and most of the elements that you may be used to seeing in Software/Systems Requirements Specifications Document (SRS). Natural language is in fact the dominant form of requirements for projects in the industry. All SRS documents will have some informal elements. We can state this fact with confidence because even the most formal requirements specification documents have to use natural language, even if it is just to introduce a formal element. Kassab and Laplante ( 2022 ) found that 69% of respondents of the RE survey reported that requirements were expressed in terms of natural language, that is, informally ( Figure 4.1 ). As natural language is notoriously imprecise, using natural language may face fundamental challenges in constructing software and systems. Some approaches bypass the challenges by using a constrained form of natural language, ensuring some degree of precision without going as far as the formal notations. Examples of these approaches include Stimulus ( Jeannet and Gaucher 2015 ), Relax ( Whittle et al. 2009 ), and Requirements Grammar ( Scott and Cook 2004 ).

    Figure 4.1 Requirement specification notation prevalence (Kassab and Laplantel 2022).

  • Semiformal Representation techniques include those that, while appearing informal, have at least a partial formal basis. For example, many of the diagrams in the Unified Modeling Language (UML) or Systems Modeling Language (SysML) family of metamodeling languages including the use case diagram are semiformal or can be formalized. UML and SysML are generally considered semiformal modeling techniques; however, they can be made entirely formal with the addition of appropriate mechanisms ( Laplante 2006 ). Other semiformal techniques include KAOS ( Dardenne et al. 1993 ), Rectify (Dassault Systems 2016 ), and User Requirements Notations (URN) ( Berenbach et al. 2012 ).

  • Formal Representations such as Z and VDM rely on mathematical formalisms to represent requirements. We will explore these further in Chapter 7 . But even formal requirements specifications documents will have elements of the informal or semiformal specification.

In this chapter, we will focus our attention mostly on requirements representation using informal techniques. While the majority of respondents of the 2020 survey on requirements engineering state of practice ( Kassab and Laplante 2022 ) stated that they encountered or used informal specifications in the industry ( Figure 4.1 ), it is probably the case that even the most informal of specification documents have some semiformal and formal elements. Likewise, even the most formal of specifications will have some informal elements (e.g., an introduction in natural language). In practice, it is recommended to have an appropriate blend of informal (natural language), semiformal (e.g., UML/SysML models), and formal elements.

Stay Updated: For the up-to-date data from the RE state of practice survey.

https://phil.laplante.io/requirements/updates/survey.php

ISO/IEC/IEEE Standard 29148

In 2011, three international standardization bodies, the International Standards Organization (ISO), the International Electrotechnical Commission (IEC), and the Institute for Electrical and Electronics Engineers (IEEE) jointly released the ISO/IEC/IEEE Standard 29148 (2011) . This standard for Systems and Software Engineering—Life Cycle Processes—Requirements Engineering is the result of harmonizing several different standards:

  • IEEE 830-1998 : IEEE Recommended Practice for Software Requirements Specifications (retired).
  • IEEE 1233-1998 : IEEE Guide for Developing System Requirements Specifications (retired).
  • IEEE 1362-1998 : EEE Guide for Information Technology—System Definition—Concept of Operations (ConOps) Document.
  • ISO/IEC 12207 : Systems and software engineering—Software life cycle processes.
  • ISO/IEC 15288 : Systems and software engineering—System life cycle processes.

In 2018, the second edition of ISO/IEC/IEEE Standard was released in response to the revision of ISO/IEC/ IEEE 15288 and ISO/IEC/IEEE 12207. The purpose of the revision was to accomplish the harmonization of the structures and contents of the two documents while supporting the requirements of the assessment community.

IEEE Standard 830-1998, which was retired, was frequently referenced in previous editions of this text. Standard 29148 expanded on IEEE 830 to incorporate the full system life cycle, recognize advances in agile and lean engineering, and focus on software-intensive systems as a general case of software. For simplicity, from here on, ISO/IEC/IEEE 29148 will be referred to as IEEE 29148.

IEEE 29148 is based on a model that produces a document that helps:

  • to establish the basis for agreement between the acquirers or suppliers on what the product is to do;
  • to force a rigorous assessment of requirements before design can begin and reduce later redesign;
  • to provide a realistic basis for estimating product costs and risks, and schedules organizations to develop validation and verification plans;
  • to provide an informed basis for deploying a product to new users or new operational environments; and
  • to provide a basis for product enhancement (IEEE 29148 2018).

There are several benefits to observing the IEEE 29148 guidelines. First, they provide a simple framework for the organization of the requirements document. Moreover, the IEEE 29148 outline is particularly beneficial to the requirements engineer because it has been widely deployed across a broad range of application domains ( Figure 4.2 ).

Figure 4.2 Table of contents for an SRS document as recommended by IEEE Standard 29148. (From ISO/IEC/IEEE Standard 29148, 2nd edition, Systems and Software Engineering—Life Cycle Processes—Requirements Engineering , 2018.)

Finally, and perhaps more importantly, IEEE 29148 provides guidance for organizing the functional and nonfunctional requirements of the SRS.

The standard also describes ways to represent functional and nonfunctional requirements under Section 3, Specific Requirements. These requirements are the next subject for discussion

Quick Access the latest version of the standard

https://phil.laplante.io/requirements/standard.php

Recommendations on Representing Nonfunctional Requirements

IEEE 29148 describes several types of nonfunctional requirements in Sections 3.2–3.7 involving:

  • Performance requirements
  • Usability requirements
  • Interface requirements
  • Logical database requirements
  • Design constraints
  • Software system attribute requirements

Performance requirements specify both the static and the dynamic numerical requirements placed on the software or on human interaction with the software as a whole. Typical performance requirements might include the number of simultaneous users to be supported, the number of transactions and tasks, and the amount of data to be processed within certain periods for both normal and peak workload conditions. The performance requirements should be stated in measurable terms, for example:

90% of the transactions shall be processed in less than 2 s.

Rather than

An operator shall not have to wait too long for the transaction to complete.

Usability requirements define the requirements measuring the effectiveness in using the system’s functionalities, efficiency, satisfaction criteria, and avoidance of harm that could arise from use in specific contexts of use. These kinds of requirements are hard to discover in novel systems or concerning new features. Prototyping can be helpful in discovering such requirements.

Interface requirements define all inputs into and outputs from the system. Each defined interface should include the following content:

  • Name of item
  • Description of purpose
  • Source of input or destination of output
  • Valid range, accuracy, and/or tolerance
  • Units of measure
  • Timing
  • Relationships to other inputs/outputs
  • Data formats
  • Command Formats
  • Data items or information included in the input and output

Logical database requirements are types of information used by various functions such as:

  • Types of information used by various functions
  • Frequency of use
  • Accessing capabilities
  • Data entities and their relationships
  • Integrity constraints
  • Security
  • Data retention requirements

Design constraint requirements are related to standards compliance and hardware limitations. We will see how to organize constraints in the requirements statements shortly.

Finally, software or system attributes often can include reliability, availability, security, maintainability, portability, and many others. In general, any such attribute is termed an “ility” because most end with an “ility.” But other attributes, such as safety, timeliness, security, and others, are also ilities.

Recommendations on Representing Functional Requirements

The functional requirements should capture all system inputs and the exact sequence of operations and responses (outputs) to normal and abnormal situations for every input possibility. Functional requirements may use case-by-case descriptions or other general forms of description.

IEEE 29148 provides a number of organizational options for the functional requirements. Functional requirements can be organized by one or more the following organizational schemes:

  • System mode (suitable if the system behaves differently under different modes of operations, e.g., navigation, combat, diagnostic)
  • User class (suitable if the system provides different functions to different user classes, e.g., user, supervisor, diagnostic)
  • Object (by defining classes/objects, attributes, functions/methods, and messages)
  • Feature (describes what the system provides to the user)
  • Stimulus (e.g., sensor 1, sensor 2, actuator 1, …)
  • Response (suitable when the system is best described by all the functions in support of the generation of a response)
  • Functional hierarchy (e.g., using a top-down decomposition of tasks)

A combination of these organizational techniques can be used within one SRS document. For example, the smart home description given in Appendix A is a feature-driven description of functionality. One clue that it is feature-driven is the mantra “the system shall” for many of the requirements. The wet-well pumping system specification in Appendix B is also largely described by functionality.

Alternatively, consider a system organized by functional mode —the NASA WIRE (wide-field infrared explorer) system (1996). This system was part of the Small Explorer program and describes a submillimeter-wave astronomy satellite incorporating standardized space-to-ground communications. Information was to be transmitted to the ground and commands received from the ground, according to the Consultative Committee for Space Data Systems (CCSDS) and Goddard Space Flight Center standards (NASA WIRE 1996 ). The flight software requirements are organized as follows:

  • System management
  • Command management
  • Telemetry management
  • Payload management
  • Health and safety management
  • Software management
  • Performance requirements

Reviewing the document under the system management mode, we see the operating system functionality described as follows:

Operating System

  • 01 The operating system shall provide a common set of mechanisms necessary to support real-time systems such as multitasking support, CPU scheduling, basic communication, and memory management.
    • 01.1 The operating system shall provide multitasking capabilities.
    • 01.2 The operating system shall provide event-driven, priority-based scheduling.
      • 01.2.1 Task execution shall be controlled by a task’s priority and the availability of resources required for its execution.
    • 01.3 The operating system shall provide support for intertask communication and synchronization.
    • 01.4 The operating system shall provide real-time clock support.
    • 01.5 The operating system software shall provide task-level context switching for the 80387 math coprocessor.

Also under system functionality is command validation, defined as follows:

Command Validation

  • 211 The flight software shall perform CCSDS command structure validation.
    • 211.1 The flight software shall implement CCSDS Command Operations Procedure number 1 (COP-1) to validate that CCSDS transfer frames were received correctly and in order.
    • 211.2 The flight software shall support a fixed-size frame acceptance and reporting mechanism (FARM) sliding window of 127 and a fixed FARM negative edge of 63.
    • 211.3 The flight software shall telemeter status and discard the real-time command packet if any of the following errors occur:
      • Checksum fails validation prior to being issued
      • An invalid length is detected.
      • An invalid application ID is detected.
    • 211.4 The flight software shall generate and maintain a command link control word (CLCW). Each time an update is made to the CLCW, a CLCW packet is formatted and routed for possible downlink (NASA WIRE 1996 ).

It is also very common in software-based systems to take an object-oriented approach to describe the system behavior. This is particularly the case when the software is expected to be built using a pure object-oriented language such as Java.

Object-oriented representations involve highly abstract system components called objects, and their encapsulated attributes and behavior. The differences between traditional structured descriptions of systems and object-oriented descriptions of systems are summarized in Table 4.1 .

Table 4.1 Object-Oriented vs. Structured Representation | | Structured | Object-Oriented | | --- | --- | --- | | System components | Functions | Objects | | Data and control specification | Separated through internal decomposition | Encapsulated within objects | | Characteristics | Hierarchical structure | Inheritance relationship of objects | | | Functional description of system | Behavioral description of system | | | Encapsulation of knowledge within functions | Encapsulation of knowledge within objects |

When dealing with requirements organized in an object-oriented fashion, it is very typical to use user stories (especially in conjunction with agile software development methodologies, which we will discuss in Chapter 8 ) or use cases and use case diagrams to describe behavior.

VIGNETTE 4.1 Security Requirements

The SRS for any system (no matter how trivial) should consist of a section on “Security Requirements.” Even non-critical software systems (e.g. an Internet of Things capable toy) can sometimes be used as an entry point to the critical systems to which they may be connected (either deliberately or unintentionally), threatening the safety and well-being of the public. Even if the system is somehow unable to connect to other systems or is non-critical in nature, the system itself needs to be protected from the insertion of malware and the theft of the intellectual property (e.g., a proprietary design or confidential personal or corporate information) contained within.

Many customers (but not all) will require security requirements in the system, but it is up to the requirements engineer to ensure that security requirements are written. The requirements engineer should help identify and minimize system vulnerabilities and protect against any attacks, such as those that steal passwords for login and network access and those that insert malware. These requirements should be presented in a section of the SRS labeled “Security Requirements” or similar terminology.

Many governments and international agencies, such as the US National Institute of Standards, publish guidelines on the identification and creation of security requirements. For example, Enhanced Security Requirements for Protecting Controlled Unclassified Information: A Supplement to NIST Special Publication 800-171.

REFERENCES

  1. Ron Ross, Victoria Pillitteri, Gary Guissanie, Ryan Wagner, Richard Graubart and Deborah Bodeau, NIST SP 800-172 Enhanced Security Requirements for Protecting Controlled Unclassified Information: A Supplement to NIST Special Publication 800-171 , February 2021, available at https://csrc.nist.gov/publications/detail/sp/800-172/final

UML/SysML

The UML is a set of modeling notations that are used in software and systems engineering requirements specification, design, systems analysis, and more. The SysML (System Modeling Language) is an extension of UML dedicated to systems engineering and provides requirements diagrams, allowing users to express requirements in a textual representation and cover non-functional requirements. SysML diagrams can also express traceability links between requirements or between requirements and implementation elements as well as other modeling artifacts.

Both UML and SysML are quite similar. For the reader’s convenience, a primer on UML by a major contributor to the UML standard, James Rumbaugh, is found in Appendix C. Use cases are one of the models found in UML and are very important to requirements engineers. Therefore, an extensive discussion of use cases is found in Appendix E.

The Requirements Document

The system (or software) requirements specification document is the official statement of what is required of the system developers. Hay ( 2003 ) likens the SRS to the score for a great opera—without a score there is chaos, but the finished score ensures that the activities and contributions of the various performers in the opera are coordinated.

It is also important to remember that, under those circumstances where there is a customer-vendor relationship between the sponsor and builders of the system, the SRS is a contract and is, therefore, enforceable under civil contract law (or criminal law if certain types of fraud or negligence can be demonstrated).

Users of a Requirements Document

There are several users of the requirements document, each with a unique perspective, needs, and concerns. Typical users of the document include:

  • Customers
  • Managers
  • Developers
  • Test engineers
  • Maintenance engineers
  • Stakeholders

Customers specify the requirements and are supposed to review them to ensure that they meet their needs. Customers also specify changes to the requirements. Because customers are involved, and they are likely not engineers, SRS documents should be accessible to the layperson (formal methodologies excepted).

Managers at all levels will use the requirements document to plan a bid for the system and to plan for managing the system development process. Managers, therefore, are looking for strong indicators of cost and time taken in the SRS.

And of course, developers use the requirements specification document to understand what system is to be developed. At the same time, test engineers use the requirements to develop validation tests for the system. Later, maintenance engineers will use the requirements to help understand the system and the relationship between its parts so the system can be upgraded or fixed. Other stakeholders who will use the SRS include all of the direct and indirect beneficiaries (or adversaries) of the system in question, as well as lawyers, judges, plaintiffs, juries, district attorneys, arbiters, mediators, etc., who will view the SRS as a legal document in the event of disputes.

It is not uncommon to have multiple specialized versions of the requirements document for a project that can be intended for different audiences. For example, a project can have a variation of:

  • Product Requirements Document : It is written from a user’s point of view to understand what a product should do.
  • A User-Interface Requirements Document : describes the look and feel of the User Interface (UI) of the system. Most often it includes mockup screenshots and wireframes to give readers an idea of what the finished system will look like.
  • Technical Requirements Document : includes requirements like the programming language the system should be developed in and the processor speed required to run the system. It might also consider the limitations of the system and its performance.
  • Quality Requirements Document : outlines the expectations of the customer for the quality of the final product. It consists of various criteria, factors, and metrics that must be satisfied.

Requirements Document Requirements

What is the correct format for an SRS? There are many acceptable formats. For example, the IEEE 29148 standard provides a general format for a requirements specification document. Other standards bodies and professional organizations, such as the Project Management Institute (PMI), have standard requirements formats and templates. Most requirements management software will produce documents in customizable formats. But the “right” format depends on what the sponsor, customer, employer, and other stakeholders require.

That the SRS document should be easy to change is evident for the many reasons we have discussed so far. Furthermore, since the SRS document serves as a reference tool for maintenance, it should record forethought about the lifecycle of the system, that is, to predict changes.

In terms of general organization, writing approach, and discourse, best practices include:

  • Using consistent modeling approaches and techniques throughout the specification, for example, a top-down decomposition, structured, or object-oriented approaches
  • Separating operational specification from descriptive behavior
  • Using consistent levels of abstraction within models and conformance between levels of refinement across models
  • Modeling nonfunctional requirements as a part of the specification models—in particular, timing properties
  • Omitting hardware and software assignments in the specification (another aspect of design rather than the specification)

Following these rules will always lead to a better SRS document. Finally, IEEE 29148 describes certain desirable qualities for requirements specification documents, and these will be discussed in Chapter 5 .

Preferred Writing Style

Engineers (of all types) have acquired an unfair reputation for poor communications skills, particularly writing. In any case, it should be clear now that requirements documents should be very well written.

There are excellent texts on technical writing that should be studied by every requirements engineer (we highly recommend Laplante 2019 ). You are urged to improve your writing through practice and by studying well-written SRS documents to learn from them. You should also read literature, poetry, and news, as much can be learned about the economy and clarity of presentation from these writings. Some have even suggested screenwriting as an appropriate paradigm for writing requirements documents (or for user stories and use cases) ( Norden 2007 ).

In any case, approach the requirements document like any writing—be prepared to write and rewrite, again and again. Have the requirements document reviewed by several other stakeholders (and by non-stakeholders who write well).

Text Structure Analysis

Metrics can be helpful in policing basic writing features. Most word processing tools calculate average word, sentence, and paragraph length, and these are valuable to collect because they can highlight writing that is too simplistic or too difficult to understand. One important feature of writing that is not computed by standard word processors, however, is the numbering structure depth.

Numbering structure depth is a metric that counts the numbered statements at each level of the source document. For example, first-level requirements numbered 1.0, 2.0, 3.0, and so forth are expected to be very high-level (abstract) requirements. Second-level requirements numbered 1.1, 1.2, 1.3, …

2.1, 2.2, 2.3, … 3.1, 3.2, etc. are subordinate requirements at a lower level of detail. Even more detailed requirements will be found at the third level, numbered as 1.1.1, 1.1.2, and so on. A specification can continue to fourth or even fifth-level requirements, but normally third or fourth levels of detail should be sufficient. In any case, the counts of requirements at levels 1, 2, 3, and so on provide an indication of the document’s organization, consistency, and level of detail.

A well-organized SRS document should have a consistent level of detail, and if you were to list out the requirements at each level, the resultant shape should look like a pyramid in that there should be a few numbered statements at level 1 and each lower level should have increasingly more numbered statements than the level above it ( Figure 4.3a ).

Figure 4.3 (a) Pyramid, (b) hourglass, and (c) diamond-shaped configurations for requirements text structure.

On the other hand, requirements documents whose requirements counts at each level resemble an hourglass shape ( Figure 4.3b ) are usually those that contain a large amount of introductory and administrative information. Finally, diamond-shaped documents represented by a pyramid followed by decreasing statement counts at lower levels ( Figure 4.3c ) indicate an inconsistent level of detail representation ( Hammer et al. 1998 ).

The NASA ARM tool introduced in Chapter 6 computes text structure for a given SRS document in an appropriate format.

Requirement Format

Each requirement should be in a form that is clear, concise, and consistent in the use of language. A requirement can be written in the form of a natural language or some other form of language. If expressed in the form of a natural language, the statement should include a subject and a verb, together with other elements necessary to adequately express the information content of the requirement. Using consistent language assists users of the requirements documents ( Hull et al. 2011 ) and renders analysis of the SRS document by software tools much easier.

A simplified standard requirement form is:

  • The [noun phrase] shall (not) [verb phrase]
    • where [noun phrase] describes the main subject of the requirement, the shall (or shall not) statement indicates a required or prohibited behavior, and [verb phrase] indicates the actions of the requirement.

Consider these two requirements for the baggage handling system:

  • The system shall reject untagged baggage
  • The system shall not reject damaged baggage

We assume that the terms “baggage,” “reject,” “tagged,” and “damage” have been defined somewhere in the SRS document.

It is not uncommon for requirements to be written in a nonstandard form. For example, the first requirement shown could be rewritten as:

  • Untagged baggage shall be rejected by the system

Both versions of this requirement are equivalent, but representing requirements in the standard form is desirable for the reasons already noted.

It is also not uncommon to omit the article in requirements, so the two example requirements would be:

  • System shall reject untagged baggage
  • System shall not reject damaged baggage

There is nothing wrong with this formulation of requirements.

It is important to identify requirements in some way for ease of reference, usually with hierarchical numbering. Hence the standard form for a requirement extends to the following:

  • [identifier] The [noun phrase] shall (not) [verb phrase]

Returning to the previous two requirements, and inventing some identifier numbers, we have the following two examples:

  • 1.2.1 The system shall reject untagged baggage.
  • 1.2.2 The system shall not reject damaged baggage.

Finally, it is desirable to place measurable constraints on performance for functional requirements whenever possible, enriching the standard requirement form to:

  • [identifier] The [noun phrase] shall (not) [verb phrase] [constraint phrase]

As an example of a requirement that includes a measurable target, let’s return to the baggage handling system. For requirement number 1.2.1, a realistic constraint might be incorporated to yield the following requirement:

  • 1.2.1 The system shall reject untagged baggage within 5 seconds of identification.

There may be variances and tolerances on the measurable targets of a requirement. For example, consider a hypothetical requirement 3.4.2 in the baggage handling system: 3.4.2. Each baggage scanner unit shall process, on average, 10 pieces of luggage per minute.

This target in this requirement can be augmented with certain constraint attributes in the format shown in Figure 4.4 ( Glinz 2008 ).

Figure 4.4 Sample requirements attribute metrics for baggage handling system.

There are other variations of the “final” individual requirement standard form, for example, those given by Hull et al. ( 2011 ) and in IEEE 29148. These variations, however, can be shown to be reducible to the format previously introduced.

Use of Imperatives

“Shall” is a command word or imperative that is frequently used in requirements specifications. Other command words and phrases that are frequently used include “should,” “must,” “will,” “responsible for”, and there are more. Wilson et al. ( 1997 ) describe the subtle differences in these imperatives, which are summarized in Table 4.2 .

Table 4.2 Imperative Words and Phrases | Imperative | Most Common Use | | --- | --- | | Are applicable | To include, by reference, standards, or other documentation as an addition to the requirements being specified | | Is required to | As an imperative in specifications statements written in the passive voice | | Must | To establish performance requirements or constraints | | Responsible for | In requirements documents that are written for systems whose architectures are predefined | | Shall | To dictate the provision of a functional capability | | Should | Not frequently used as an imperative in requirement specification statements | | Will | To cite things that the operational or development environment is to provide to the capability being specified |

Source : Wilson, W.M., Rosenberg, L.H., & Hyatt, L.E., Automated analysis of requirement specifications, in Proceedings of the 19th International Conference on Software Engineering , pp. 161–171, 1997.

It is considered good practice to use “shall” as the imperative when requirements are mandatory and to omit the use of weak imperatives such as should for optional requirements. When requirements are ranked for importance, as they should be, a requirement in standard form with a low rank is, essentially, one that can be deemed an optional requirement.

Shall or Shall Not?

When writing requirements, it is generally preferred to use the positive form, rather than the negative form. That is, the requirement should be written using “shall” statements rather than “shall not” statements. IEEE 29148 advises against writing “shall not” requirements altogether. But it is possible, and sometimes desirable, for there to be exceptions particularly for those requirements pertaining to hazards. Consider the following example. The requirement

  • The system shall permit access only to authorized users.

can be rewritten equivalently as

  • The system shall not permit access to unauthorized users.

In this case, the first form is easier to understand because it does not involve a double negative. But consider the problem of designing test cases to prove that the requirement has been met. In the first form, the test cases have to involve the subsets of authorized and unauthorized users. Then we need to decide if we are to use exhaustive testing, or equivalence class testing, or pairwise testing, and so on for both authorized and unauthorized users. Conversely, in the second form, only a set of test cases involving one or more unauthorized users need to be created in order to show satisfaction of the requirement. We still have to decide on how to select a subset of the universe of unauthorized users, but the second form of the requirement simplifies testing significantly.

In some cases, there may be simply a psychological impact on stakeholders (particularly lawyers) in using the “shall not” form instead of the “shall” form of the requirement. Consider this example:

  • The system shall not harm humans.
    • This requirement seems more straightforward than the requirement
  • The system shall cause humans no harm.

In any case, you should write requirements using shall statements whenever possible, and when clarity is not sacrificed. But “shall not” requirements may occasionally be preferred to their “shall” equivalent form.

Avoiding Imprecision in Requirements

All requirements in a specification document should be precise. That is by using measurable quantities and avoiding vague modifiers such as countless, some, approximately, huge, tiny, microscopic, and so on. These vague words need to be replaced with measurements. Assigning measurements to requirements is also a very powerful form of validation.

For example, consider the following requirement for the baggage handling system:

  • 4.3.1 The number of pieces of baggage lost by the system shall be minimal.

This statement is vague and gives designers no real guidance. The following requirement is an improvement:

  • 4.3.1 The number of pieces of baggage lost by the system shall be less than 0.001% of pieces entered.

This requirement is now measurable, and thus, more precise.

More examples of imprecise words/phrases are:

  • Vague pronouns (such as “it,” “this,”, “that”)
  • Ambiguous terms such as adverbs and adjectives (such as “almost always,” “many,” “few,” “significant,” “minimal”) and ambiguous logical statements (such as “or,” “and/or”)
  • Open-ended, non-verifiable terms (such as “provide support,” “but not limited to,” “as a minimum”)
  • Comparative phrases (such as “better than,” “higher quality”)
  • Loopholes (such as “if possible,” “as appropriate,” “as applicable”)
  • Terms that imply totality (such as “all,” “always,” “never,” and “every”)

In a requirement, ambiguous terms should be replaced with fractions or ranges. For example, the fractions 1/100, 1/20, 1/2, and 9/10 could replace the aforementioned words, respectively. Appropriate ranges could be “<10,” “10–20,” “21–50,” and “51–99,” respectively.

Other forms of imprecision using fuzzy words can lead to ambiguity in requirements. For example, specifying something to happen “frequently” in a requirement should be replaced by a range or an approximate rate. For example, instead of “frequently” use “more than 75% of the time.” Providing a hard number or range allows for a reference point for future refinement of the information from a fuzzy number (or range) to a finer range or exact number.

You can’t always replace hedging words with precision. Sometimes only an approximation is possible. For example, consider a discussion of the likelihood of some event for which you have no prior statistics, and not even a probability model for constructing predictive statistics. This would be a case where stakeholder negotiated probabilities would be needed to agree to some acceptance criteria.

To address the problem of ambiguous and incomplete nonfunctional requirements, consultant Tom Gilb ( 2005 ) developed Planguage , a language with a rich set of keywords that permits precise statements of quality attributes and other project goals. We will discuss Planguage further in the next chapter.

A more recent approach to specify requirements is presented by Meyer et al. ( 2019 ) based on the “PEGS” view of requirements where the four parts cover Project, Environment, Goals, and System. This approach treats requirements as a project activity, not necessarily a lifecycle step. The starting point, which gives its name to the approach, is that requirements should cover the four aspects mentioned, the four “PEGS,” defined as follows:

  • A goal is a result desired by an organization.
  • A system is a set of related artifacts, devised to help meet certain goals.
  • A project is the set of human processes involved in the planning, construction, revision, and operation of a system.
  • An environment is the set of entities (such as people, organizations, devices, other material objects, regulations, and other systems) external to the project and system but with the potential to affect the goals, project, or system or to be affected by them.

Requirements Document Size

There are few studies covering the statistics of requirements specification document size in terms of number of requirements, page length, and other measures. Yet, the question is often asked—how long should the SRS document be? In a 2003 survey of software professionals concerning software requirements engineering practices, respondents were asked about SRS document length ( Neill and Laplante 2003 ). Respondents reported that about 40% of documents comprised fewer than 25 pages and about 30% were between 25 and 50 pages. Roughly 25% of SRS documents were reported to be between 51 and 100 pages, 17% between 101 and 250 pages, and the balance was of length 251 or more pages.

The aforementioned numbers are consistent with those found in a study of 56 NASA requirements specifications documents developed in the 1990s through the early 2000s ( Wilson et al. 1997 ). For the projects studied, the SRS document sizes ranged from about 140–28,000 lines of text, with a median of 2,200 and an average of 4,700 lines of text. Assuming 60 lines of text per page, these figures convert to a range of 2–470 pages, a median of 37, and an average of 78 pages.

Based on our own observations and discussions with many practitioners, we suspect that if these studies were repeated today the numbers would not differ significantly. Clearly then, the industrial norm is for relatively short requirements specification documents. No judgment can be rendered as to whether this finding is good or bad since each individual SRS document has to be judged on qualities other than length.

Behavioral Specifications

In some cases, the requirements engineer may be asked to reverse engineer requirements for an existing system when the requirements do not exist, are incomplete, are out of date, or are incorrect. It may also be necessary to generate requirements for open-source software (software that is free for use and/or redistribution under the terms of a license) for the purposes of generating test specifications. In these cases, a form of SRS, the behavioral specification, needs to be generated.

The behavioral specification is identical in all aspects to the requirements specification, except that the former represents the engineers’ best understanding of what the users intended the system to do, while the latter represents the users’ best understanding of what the system should do. The behavioral specification has an additional layer of inference and, therefore, can be expected to be even less complete than a requirements specification.

Fortunately, there is an approach to generating the behavioral specification. The technique involves assembling a collection of as many artifacts as possible that could explain the system’s intent. Then, these artifacts are used to reconstruct the system’s intended behavior as it is best understood. The foregoing description is adapted from the original paper by Elcock and Laplante ( 2006 ).

Artifacts that may be used to derive a behavioral specification include (but should not be limited to):

  • Any existing requirements specification, even if it is out of date, incomplete, or known to be incorrect
  • User manuals and help information (available when running the program)
  • Release notes
  • Bug reports and support requests
  • Application forums
  • Relevant versions of the software under consideration

Some of these artifacts may have to be scavenged from various sources, such as customer files, emails, open-source community repositories, or archives. A brief description of how these artifacts are used in generating the specification is given below.

Starting with user manuals, statements about the behavior of an application in response to user input can be directly related to the behavioral specification. User manuals are particularly well suited for this purpose since describing the response of software to user stimulus is germane to their existence. Help information, such as support websites and application help menus, is also rich in information that can either be used directly or abstracted to define behavioral requirements.

Next, release notes can be consulted. Release notes are typically of limited benefit to the process of developing test cases since they tend to focus on describing which features are implemented in a given release. There is usually no description of how those supported features should function. However, release notes are particularly important in resolving the conflict that arises when an application does not respond as expected for features that were partially implemented in or removed from future implementation.

Defect reports can also be a great source for extracting behavioral responses because they are typically written by users, they identify troublesome areas of the software, and they often clarify a developer’s intention for the particular behavior. Defect reports, at least for open-source systems, are readily found in open repositories such as Bugzilla. While it is true that in some cases bug reports contain too much implementation detail to be useful for extracting behavioral responses, they can be discarded if behavior cannot be extrapolated from the details.

In many ways, the content of support requests is similar to bug reports in that they identify unexpected behavior. Unlike bug reports, however, support requests can sometimes be helpful in identifying features that are not fully implemented as well as providing information that illuminates the expectations of users. It is important to investigate both since, in addition to providing the insights mentioned, they may also aid in rationalizing unexpected behavior.

For many open-source projects, and some closed-source projects, there are web-based forums associated with the project. Within these forums, various amounts of behavioral information can be extracted. Ranging from useless to relevant, open-discussion postings need to be carefully filtered and applied only when other development artifacts are lacking. As with other artifacts, these postings can also be used to clarify behavior.

Finally, in the absence of any other artifacts, the software being tested could itself be an input to developing structural (glass-box) test cases. Assuming that this approach is necessary, the reality is that it will really be the tester’s characterization of correct behavior that will largely prevail in defining the test cases.

Once the discovery process has concluded, the behavioral specification can be written. The format of the behavioral specification is identical to that for the requirements specification ( Elcock and Laplante 2006 ) and all of the IEEE 29148 rules should be applied.

Best Practices and Recommendations

Writing effective requirements specifications can be very difficult even for trivial systems because of the many challenges that we have noted. Some of the more common dangers in writing poor SRS documents include:

  • Mixing of operational and descriptive specifications
  • Combining low-level hardware functionality and high-level systems and software functionality in the same functional level
  • Omission of timing information

Other bad practices arise from failing to use language that can be verified. For example, consider this set of requirements:

  • The system shall be completely reliable.
  • The system shall be modular.
  • The system will be fast.
  • Errors shall be less than 99%.

What is wrong with these? The problem is they are completely vague and immeasurable, and therefore, their satisfaction cannot be demonstrated. For example, what does “completely reliable” mean? Any arbitrary person will have a different meaning for reliability for a given system. Modularity (in software) has a specific meaning, but how is it measurable? What does “fast” mean? Fast as a train? Faster than a speeding bullet? This requirement is just so vague. And finally “errors shall be less than 99%” is a recipe for a lawsuit. 99% of what? Over what period of time?

For the above set of requirements, the improved version is:

  • Response times for all level one actions will be less than 100 ms.
  • The cyclomatic complexity of each module shall be in the range of 10–40.
  • % of the transactions shall be processed in less than 1 s.
  • Meantime before the first failure shall be 100 hours of continuous operation.

But even this set is imperfect, because there may be some important details missing—we really can’t know what, if anything, is missing outside the context of the rest of the SRS document. Using Glintz’s attribute template ( Figure 4.4 ) is a good solution to this problem.

Some final recommendations for the writing of specification documents are:

  • Invent and use a standard format and use it for all requirements.
  • Use language in a consistent way.
  • Use “shall” for mandatory requirements.
  • Use “should” for desirable requirements.
  • Use text highlighting to identify key parts of the requirement.
  • Avoid the use of technical language unless it is warranted.

Dick ( 2010 ) also suggests avoiding the following when writing the requirements document:

  • Rambling phrases
  • Hedging clauses, such as “if necessary”
  • Conjunctions such as “and,” “or,” and “but,” since these
  • Can lead to multiple requirements in a single statement
  • Speculative terms such as “perhaps” and “sometimes”
  • Vague terms such as “user-friendly” and “generally” since these cannot be verified

But we are not done yet with our treatment of writing the requirements specification. Chapters 5 and 6 are devoted to perfecting the writing of specific requirements.

VIGNETTE 4.2 Product Line Engineering

It is often the case that requirements specifications for product line systems (see Exercise 1.14) consist of a baseline or template of shared requirements. Then, different requirements are added for the diverse instances of related products in the line. Purposeful requirements engineering for a product line can mean significant cost savings over haphazard approaches. Consider the following example. A very large (multibillion dollar) multinational firm produces engines of all kinds—from small gas-powered to very large jet turbines. The company has more than 150 major projects with over 50,000 requirements in each. Many of these projects have very similar requirements sets. Yet the leveraging effect of product line requirements engineering is not realized.

Tool use is inconsistent across projects and engineering sites, so the power of reusability, change tracking, and identification of missed or excessive requirements is lost. One would expect that a large organization would do things better, but part of the problem for this company is that there were no tools available in the early days of the company and the older engineers didn’t realize the potential for product line engineering and the need to change the way things were done. Further problems arose as the company grew over the decades by acquiring companies that used many different tools and had far-ranging engineering practices.

Of course, standardizing tool use and engineering practices across the company is a big part of the solution, but so too is training, so that all engineers use the tool in the same correct way. A corporate and project “metaphor” needs to be created so that engineers are all “on the same page.” Solid product line engineering practices would then be possible.

The situation just described is not unique to large companies.

Exercises

  • 4.1 Under what circumstances is it appropriate to represent an SRS using informal techniques only?
  • 4.2 What can the behavioral specification provide that a requirements document cannot?
  • 4.3 If the customer requests that future growth and enhancement ideas be kept, where can these ideas be placed?
  • 4.4 What are some items to be included under “data retention” in the SRS?
  • 4.5 Here are some more examples of vague and ambiguous requirements that have actually appeared in real requirements specifications. Discuss why they are vague, incomplete, or ambiguous. Provide improved versions of these requirements (make necessary assumptions).
    • 4.5.1 The tool will allow for expedited data entry of important data fields needed for subsequent reports.
    • 4.5.2 The system will provide an effective means for identifying and eliminating undesirable failure modes and/or performance degradation below acceptable limits.
    • 4.5.3 The database creates an automated incident report that immediately alerts the necessary individuals.
    • 4.5.4 The engineer shall manage the system activity, including the database.
    • 4.5.5 The report will consist of data, in sufficient quantity and detail, to meet the requirements.
    • 4.5.6 The data provided will allow for a sound determination of the events and conditions that precipitated the failure.
    • 4.5.7 The documented analysis report will include, as appropriate, investigation findings, engineering analysis, and laboratory analysis.
  • 4.6 In Section 9.4 of the SRS in the appendix, which requirements are suitable for representing using the “measurable targets” in the format shown in Figure 4.4 ?
  • 4.7 Many of the requirements in the appendix can be improved in various ways. Select ten requirements listed and rewrite them in an improved form. Discuss why your rewritten requirements are superior using the vocabulary of IEEE 29148.
  • 4.8 Convert the following “shall not” requirements in Appendix A to “shall” format: 4.1.1, 5.2.2, 6.1.8, 8.1.17.
  • 4.9 Convert the following “shall not” requirements in Appendix A to “shall” format: 9.1.2.6, 9.3.3, 9.3.5, 9.3.13, 9.5.10.
  • *4.10 Research different techniques for creating context diagrams and prepare a report highlighting the strengths and weaknesses of each.
  • *4.11 The requirements specifications in Appendices A and B use imperatives inconsistently. Using a textual analysis tool such as ARM or via manual analysis, assess the use of imperatives in these documents and suggest improvements.

References

  1. Berenbach , B., Schneider, F., & Naughton, H. (2012, September). The use of a requirements modeling language for industrial applications. In 2012 20th IEEE International Requirements Engineering Conference (RE) (pp. 285–290). IEEE, Chicago, IL, USA.
  2. Dardenne , A., Van Lamsweerde, A., & Fickas, S. (1993). Goal-directed requirements acquisition. Science of Computer Programming , 20(1–2): 3–50.
  3. Dassault Systems. (2016). CATIA Reqtify . Retrieved from https://www.3ds.com/products-services/catia/products/reqtify
  4. Dick , J. (2010). Requirements engineering: Principles and practice. In P. Laplante (Ed.), Encyclopedia of Software Engineering (pp. 949–961). Taylor & Francis, Boca Raton, FL, Published online.
  5. Eberlein , A., & Jiang, L. (2011). Requirements engineering: Technique selection. In P. Laplante (Ed.), Encyclopedia of Software Engineering (pp. 962–978). Taylor & Francis, Boca Raton, FL, Published online.
  6. Elcock , A., & Laplante, P. A. (2006). Testing without requirements. Innovations in Systems and Software Engineering: A NASA Journal , 2: 137–145.
  7. Gilb , T. (2005). Competitive Engineering: A Handbook for Systems Engineering, Requirements Engineering, and Software Engineering Using Planguage . 1 edition. Butterworth-Heinemann, UK.
  8. Glinz , M. (2008). A risk-based, value-oriented approach to quality requirements. Computer , 25(2): 34–41.
  9. 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.
  10. Hay , D. (2003). Requirements Analysis: From Business Views to Architecture . Prentice Hall PTR, Upper Saddle River, NJ.
  11. Hull , E., Jackson, K., & Dick, J. (2011). Requirements engineering in the problem domain. In E. Hull, K. Jackson, & J. Dick. (Eds.), Requirements Engineering (pp. 93–114). Springer-Verlag, London.
  12. IEEE Standard 830-1998. (1998). Recommend Practice for Software Requirements Specifications . IEEE Standards Press, Piscataway, NJ.
  13. ISO/IEC/IEEE Standard 29148. (2011). Systems and Software Engineering—Life Cycle Processes—Requirements Engineering . IEEE, Piscataway, NJ.
  14. Jeannet , B., & Gaucher, F. (2015). Debugging real-time systems requirements: simulate the “what” before the “how”. In Embedded World Conference , Nürnberg, Germany.
  15. Kassab , M., & Laplante, P. (2022). The current and evolving landscape of requirements engineering state of practice. IEEE Software . DOI: 10.1109/MS.2022.3147692 .
  16. Laplante , P. A. (2006). What Every Engineer Should Know about Software Engineering . CRC Press, Boca Raton, FL.
  17. Laplante , P. A. (2019). Technical Writing: A Practical Guide for Engineers and Scientists , 2nd edition. CRC Press, Taylor & Francis, Boca Raton, FL.
  18. Meyer , B., Bruel, J. M., Ebersold, S., Galinier, F., & Naumchev, A. (2019, October). Towards an anatomy of software requirements. In International Conference on Objects, Components, Models and Patterns (pp. 10–40). Springer, Cham.
  19. NASA WIRE (Wide-Field Infrared Explorer) Software Requirements Specification. (1996). http://science.nasa.gov/missions/wire/ (accessed January 2017).
  20. Neill , C. J., & Laplante, P. A. (2003). Requirements engineering: The state of the practice. Software , 20(6): 40–45.
  21. Norden , B. (2007). Screenwriting for requirements engineers. Software , 24: 26–27.
  22. Ricca , F., Scanniello, G., Torchiano, M., Reggio, G., & Astesiano, E. (2010). On the effectiveness of screen mockups in requirements engineering: Results from an internal replication. In Proceedings of the 2010 ACM-IEEE International Symposium on Empirical Software Engineering and Measurement (Vol. 17, p. 26), Bolzano, Italy.
  23. Scott , W., & Cook, S. C. (2004). A Context-Free Requirements Grammar to Facilitate Automatic Assessment , AWRE’04 9th Australian Workshop on Requirements Engineering, Adelaide, Australia.
  24. Sutcliffe , A., Thew, S., & Jarvis, P. (2011). Experience with user-centred requirements engineering. Requirements Engineering , 16(4): 267–280.
  25. Whittle , J., Sawyer, P., Bencomo, N., Cheng, B. H., & Bruel, J. M. (2009, August). Relax: Incorporating uncertainty into the specification of self-adaptive systems. In 2009 17th IEEE International Requirements Engineering Conference (pp. 79–88). IEEE, Atlanta, GA, USA.
  26. 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.