2. SW Requirements Analysis TechniquesThis section lists several different techniques that can be used by either software assurance or safety personnel to aid in analyzing the software requirements. The few techniques that are required for software assurance or safety personnel are noted below. It is recommended that at least one other method be chosen for inclusion in the requirements analysis. Consider the areas where the project requirements seem weak or where most of the requirements issues have been found previously and tailor the approach. This tab contains some checklists and guidance for requirements analysis. Other guidance to consider while analyzing requirements can be found in this SWE Handbook in tabs 3 and 7 of the following requirements: SWE-052, SWE-134, SWE-050, SWE-051, and SWE-184. NASA Missions go through a logical decomposition in defining their requirements. Requirements analysis addresses a system’s software requirements including analysis of the functional and performance requirements, hardware requirements, interfaces external to the software, and requirements for qualification, quality, safety, security, dependability, human interfaces, data definitions, user requirements, installation, acceptance, user operation, and user maintenance. - Requirements/and or Operations Concepts Walkthroughs - this technique provides an understanding of the system
- The following roles will need to have a good understanding of the requirements and should attend/participate in the walkthroughs: System Engineers, Software Developers, Software Testers including IV&V, Software Assurance personnel, Software, and System Safety personnel, Operations people, users.
- Generally, these types of walkthroughs give the participants a good view of the expected flows through the system to perform the necessary operations as well as the data flow that is needed for each operation. This can help determine whether all the correct requirements are in place to support all the operational scenarios as well as whether the necessary data has been defined. These walkthroughs can also provide a good background understanding of the system’s operations that will help identify potential system hazards.
- Walkthroughs also provide an opportunity for open discussion of the requirements. These in-depth discussions may lead to the identification of additional requirements as the requirements and their intent are better understood.
- Peer Reviews or Formal Inspections
- Peer Reviews or Formal Inspections can be used to focus on smaller areas of concern or to look at potential problem areas of the requirements.
- For example, a peer review could focus on just correctness or consistency:
Determine correctness Requirements are considered correct if they "respond properly to situations" and are appropriate to meet the objectives of higher-level requirements. A method for determining correctness is to compare the requirements set against operational scenarios developed for the project. Determine consistency Requirements are consistent if they do not conflict with each other within the same requirements set and if they do not conflict with system (or higher-level) requirements. It is helpful to have at least one person read through the entire set of requirements to confirm the use of consistent terms/terminology throughout. Peer reviews or formal inspections are particularly important for the areas where the requirements seem the weakest or where the organization typically finds the most problems with requirements. 3. Checklists: Several checklists can be used to help analyze requirements. It is often useful to consider using one or more of these to supplement other analysis methods. The checklist SAANALYSIS is shown below (previously located in 7.18) is a good general checklist that covers many areas to be considered in your analysis. Click in the thumbnail to view it. From the viewer, you may download a copy for your use. 
When evaluating the software requirements, consider the list of items below: - Is the approach to requirements decomposition reasonable, appropriate, and consistent?
- Are the system’s software requirements both individually and in aggregate of high quality (clear, concise, complete, consistent, feasible, implementation independent, necessary, singular, traceable, accurate, unambiguous, and verifiable)?
Clear and concise. The requirement ensures that statements can only be interpreted unambiguously. “ The terms and syntax used must be simple, clear and exact”. For a clear and concise requirement, the use of weak terms, synonyms, and unclear sentence structure leads to misunderstandings. Complete. The requirement describes adequately “the capability and characteristics to meet the stakeholder’s needs”. Further explanation and enhancement of the requirement are not necessary. Consistent. The requirement has no conflicts. Defined terms are used consistently throughout the requirement. Feasible. The requirement can be implemented technically and does not need further advanced technologies. The system constraints are considered regarding legal, cost, and schedule aspects. Implementation independent. The requirement is specified independently from the implementation: “The requirement states what is required, not how the requirement should be met”. Necessary. The requirement contains relevant information and is not deprecated. Singular. A requirement cannot be divided into further requirements. It includes one single statement. Traceable. “The requirement is upwards [and downwards] traceable”. Every requirement at each development stage can be traced to a requirement either to the current or to the previous and subsequent development stage. The requirement considers the dependency and possible conflicts among software. - Accurate. Each requirement must accurately describe the functionality to be built.
- Unambiguous. A Requirements Document is unambiguous if and only if every requirement stated therein has only one interpretation.
Verifiable. The requirement necessitates the verification of the statement by using the standard methods of inspection, analysis, demonstration, or test.
- Will requirements adequately meet the needs of the system and expectations of its customers and users?
- Do requirements consider the operational environment under nominal and off-nominal conditions? Are the requirements complete enough to avoid the introduction of unintended features? Specifically:
- Do the requirements specify what the system is supposed to do?
- Do requirements guard against what the system is not supposed to do?
- Do the requirements describe how the software responds under adverse conditions?
- Is this requirement necessary?
- Are the requirements understandable?
- Are the requirements organized in a manner such that additions and changes can be made easily?
- Are the requirements unnecessarily complicated?
- Has system performance been captured as part of the requirements?
- Are the system boundaries (or perhaps operational environment) well defined?
- Is a requirement realistic given the current technology?
- Is the requirement singular in nature, or could it be broken down into several requirements? (looking at grammar not whether it can be decomposed or not)
- Within each requirement level, are requirements at an appropriate and consistent level of abstraction?
- In the traceability, are the parent requirements represented appropriate child requirements?
- Do the parent requirements include outside sources such as:
- Hardware specifications
- Computer\Processor\Programmable Logic Device specifications
- Hardware interfaces
- Operating system requirements and board support packages
- Data\File definitions and interfaces
- Communication interfaces including bus communications Software interfaces
- Derived from Domain Analysis
- Fault Detection, Isolation and Recovery requirements
- Models
- Commercial Software interfaces and functional requirements
- Software Security Requirements
- User Interface Requirements
- Algorithms
- Legacy or Reuse software requirements
- Derived from Operational Analysis
- Prototyping activities
- Interviews
- Surveys
- Questionnaires
- Brainstorming
- Observation
- Software Test Requirements
- Software Fault Management Requirements
- Hazard Analysis
- Does the Software Requirements Specification contain the following information:
- System overview.
- CSCI requirements:
- Functional requirements.
- Required states and modes.
- External interface requirements.
- Internal interface requirements.
- Internal data requirements.
- Adaptation requirements (data used to adapt a program to a given installation site or given conditions in its operational environment).
- Safety requirements.
- Performance and timing requirements.
- Security and privacy requirements.
- Environment requirements.
- Computer resource requirements:
- Computer hardware resource requirements, including utilization requirements.
- Computer software requirements.
- Computer communications requirements.
- Software quality characteristics.
- Design and implementation constraints.
- Personnel-related requirements.
- Training-related requirements.
- Logistics-related requirements.
- Precedence and criticality of requirements.
- FDIR requirements for system, hardware, and software failures
- Software State transitions, state diagrams
- Assumptions for design and operations are documented
- Qualification provisions (e.g., demonstration, test, analysis, inspection).
- Bidirectional requirements traceability.
- Requirements partitioning for phased delivery.
- Testing requirements that drive software design decisions (e.g., special system-level timing requirements/checkpoint restart).
- Supporting requirements rationale.
- Is there bidirectional traceability between parent requirements, requirements, and preliminary design components?
- Do the detailed software requirements trace to a reasonable number of parent requirements? (e.g., does the ratio between detailed requirements and parent requirements look reasonable, do all of the software detailed requirements trace to too few parent requirements (inadequate system requirement definitions)).
- Are trace links of high quality (e.g., avoidance of widows and orphans, circular traces, traces within a requirements level, etc.)?
- Have high-risk behaviors or functions been identified, and does SA agree with the identified behaviors? This should result in a list of critical activities to be performed by software and analyzed further by software assurance.
- For critical activities, are associated requirements correct and complete against SA understanding of the system behavior? Note: consider additional analysis rigor to address critical activities.
- Are interface requirements with the hardware, users, operators, or other systems adequate to meet the needs of the system concerning expectations of its customer and users, the operational environment, safety and fault tolerance, and both functional and non-functional perspectives?
- Has a fault tolerance strategy for fault detection, identification, and recovery (FDIR) from faults been provided, and is it reasonable?
- Is the role of software as part of the FDIR understood?
- Are software-related activities associated with the fault tolerance strategy for fault detection and identification and recovery captured as requirements?
- Is human safety addressed through the requirements?
- Have hazards and hazard causes been adequately identified, with associated software detection and mitigations captured as requirements?
- Are must-work and must-not-work requirements understood and specified?
- Have requirements addressed the security threats and risks identified within the system concept specifications and the system security concept of operations (e.g., System Security Plan)
- Do requirements define appropriate security controls to the system and software?
- Can the requirement(s) be efficiently and practically tested?
- Do the requirements address the configuration of, and any associated constraints, associated with COTS, GOTS, MOTS, and Open Source software?
- Do the requirements appropriately address operational constraints?
- Does the requirement conflict with domain constraints, system constraints, policies, or regulations (local and governmental)?
- Have users/operators been consulted during requirements development to identify any potential operational issues?
- Have the software requirements been peer-reviewed?
4. Traceability For the basic requirements on traceability, see SWE-052 in NASA-STD-8739.8. Software Assurance should be confirming that the bidirectional trace is complete and includes traces for all the levels specified in SWE-052. The requirements traceability matrix will show whether all of the system-level and higher-level requirements assigned to software have been addressed and broken down into software requirements that can be coded. It will also show whether any software requirements do not have parents (and may not be necessary). Traceability is important for the full life cycle since it will show where the requirements were allocated and are getting designed, implemented, and tested. Traceability is particularly important when there are changes that need to be addressed throughout the system. For example, if a change in requirements occurs when the code is being generated, the traceability will show where the requirement affects the design and the code. The traceability between the requirements and the tests is to determine whether all the requirements in the system are being tested and similarly, the traceability between the system hazards and the requirements will help determine whether all the system hazards are being addressed. 5. Verify Accuracy of Mathematical Specifications While the requirements analysis is in process, the algorithms and mathematical specifications need to be verified to ensure that what inputs to the system are computed, the specifications, and algorithms produce a correct value. Ensure that correct units have been specified for all components in the specifications/algorithms. Many other techniques can be used in requirements analysis to assist in getting the best requirements set possible. Some others are mentioned below: 6. Modeling of inputs and outputs; Use of Data Flow Diagrams, Control Flow Diagrams, Scenario-Based Modeling, Behavioral-Based Modeling-TBS 7. Use Cases, User Stories (Typically used in Agile) i. To analyze the requirements in an Agile software development environment, it is important to understand the relationship between user stories and requirements and where user cases fit in. ii. Requirements have been typically used for the NASA systems developments. Requirements describe the features of the system being built and convey the user’s expectations. They tend to be very specific and go into detail on how the software should work. Traditionally, the requirements are written by the product manager, the systems engineer, or the technical lead. Projects using many of the traditional development methodologies use the written requirements and go directly into the design phase after their requirements analysis. In Agile developments where they are provided with standard NASA requirements, the Product Owner typically breaks the requirements into agile user stories and/or use cases. iii. Agile User Stories: User Stories are typically used with Agile Methodologies. The Agile Alliance describes a user story as work to be done divided into functional increments. A more simplified definition can be attributed to Atlassian: “A user story is an informal, general explanation of a software feature written from the perspective of the end-user. Its purpose is to articulate how a software feature will provide value to the customer.” User stories are often used to plan the work in an Agile software development environment. They usually consist of one or two sentences in a specific structure to identify the user, what they want, and why. User stories are all about providing value to the customer. It’s what the user wants (the “results”). iv. Agile Use Cases Use cases are more detailed than user stories and focus on exactly how the software will work. Use cases are all about the “behavior” that is built into the software to meet the customer/user’s needs. When Agile use stories/use cases are used, analysis is still required but may take on a different flavor. They give context to the requirements. Some important considerations: Ensure the User Stories are well formulated. To convey the appropriate information, User Stories are commonly in the form of: -As a <role>, -I want <requirement> -so that <rationale/goal>. Ensure that the set of user stories/use cases capture all of the information that may exist in the more traditional forms of requirements. Consider how the user stories can be tested and ensure that all the required capabilities can be tested through the user stories. Perform bidirectional traces between the traditional requirements and the user stories/use cases. Ensure that all safety-critical hazard controls trace to user stories and use cases. Review Appendix A in NASA-STD-8739.8 to ensure that all applicable software hazard causes have been considered for inclusion in the user stories and use cases. 8. Use of a Requirements Analysis Tool, such as Innoslate, or requirements modeling tools such as UML Many tools can be used to check some of the attributes being reviewed during the requirements analysis activities. |