Course contentsShow

Module 11 · Lesson 2

Verification and Independent Review

Mission-critical software is trusted because of evidence. This lesson covers requirements-based testing, coverage, static analysis, coding standards, peer review and independent verification and validation.

7 minute readUpdated November 23, 2026

Learning objectives

After this lesson you will be able to:

  • Explain requirements-based testing and two-way traceability between requirements, code and tests
  • Describe how structural coverage, static analysis and coding standards provide evidence, and how the required rigor scales with criticality
  • Explain what makes verification independent and why programs pay for it

Evidence, not confidence

The foundation course introduced verification, validation and the verification matrix. Mission-critical software has to be shown, to people who did not write it, to meet its requirements and to do nothing harmful besides. That takes several kinds of evidence, each covering the blind spots of the others.

Requirements-based testing and traceability

In requirements-based testing, every test exists because a requirement says something, and every requirement has at least one test, analysis or inspection that verifies it. A test derived from the code instead proves only that the code does what the code does.

Module 01 introduced traceability between requirements and their evidence. For software the chain is longer, running from system requirement to software requirement, to design, to code, to test and to result. It is followed in both directions:

  • Forward. Every requirement is implemented and verified.
  • Backward. Every test and every piece of code is justified by a requirement. Code that traces to nothing is either a missing requirement or unintended functionality, and both matter.

Linking tickets to pull requests and tests is the familiar version of this. The differences are that the links are complete, audited and delivered as part of the product, and that tests must include off-nominal cases: invalid inputs, boundary values and fault responses.

Structural coverage as evidence

Structural coverage measures which parts of the code the requirements-based tests executed. It is not a target to be reached by writing extra tests against the code. It is a way of finding gaps. Code that was never executed points to a missing test, a missing requirement, dead code, or defensive code that needs a written justification.

The common criteria, in increasing strength, are:

  • Statement coverage. Every statement has run.
  • Decision coverage. Every decision has evaluated both true and false.
  • Modified condition/decision coverage, or MC/DC. Each condition inside a decision has been shown to change the outcome on its own.

More critical software is held to stronger criteria. Civil aviation's DO-178C standard is the clearest example: it requires statement coverage at its Level C, decision coverage at Level B and MC/DC at Level A, the most critical. The NASA and ECSS classifications described in Module 09 work the same way, scaling the required evidence to the class.

Full coverage does not show that software is correct. It cannot reveal a function that was never written or a requirement that was wrong.

Static analysis and coding standards

Static analysis examines code without running it. Tools range from compiler warnings, through rule checkers, to analyzers that reason about every value a variable could take and report possible overflows, out-of-bounds accesses and divisions by zero. They find defects on paths that tests seldom reach.

A coding standard restricts the language to a subset that is predictable and analyzable. Module 09 listed typical rules, such as bounded loops and no dynamic allocation after startup. Much flight software is written in C or C++, and two published sources of such rules are widely cited.

  • The Power of Ten. Gerard Holzmann of NASA's Jet Propulsion Laboratory published ten rules for safety-critical C code in 2006. They include simple control flow with no recursion, a fixed upper bound on every loop, no dynamic memory allocation after initialization, short functions, frequent assertions, checking every return value, and compiling with all warnings enabled while using static analyzers.
  • MISRA C. These guidelines originated in the automotive industry in the late 1990s and are now used in many safety-related fields. They define a subset of C that avoids undefined and unpredictable behavior, and they require departures from a rule to be recorded and justified.

Linters and strict compiler settings are the mainstream parallel, except that suppressing a finding is a recorded decision.

Peer review

Flight code is inspected against checklists by reviewers who include domain specialists. A controls engineer reviews the control law, not only another programmer. Requirements and test procedures are reviewed too, because a defect in a requirement is cheapest to remove before anything is built on it.

Independent verification and validation

Independent verification and validation, or IV&V, is carried out by an organization that is independent of the developer in three ways:

  • Technical. It uses its own people, methods and tools, and forms its own understanding of the problem.
  • Managerial. It reports outside the development project.
  • Financial. Its budget is not controlled by the development project.

NASA runs a dedicated IV&V program for its most critical software. It frames the work as three questions: whether the software does what it is supposed to do, whether it avoids doing what it is not supposed to do, and whether it responds appropriately under adverse conditions.

Independence matters because developers and their own testers share assumptions. A reviewer who has the same misunderstanding of a requirement as the author will approve the implementation of that misunderstanding. An independent group also has no stake in the delivery date. External security audits are the closest equivalent in mainstream software.

The cost of verification and the cost of failure

On critical software, verification commonly takes more effort than writing the code. The justification is the cost of failure. A defect can end a mission worth hundreds of millions of dollars, and it cannot be patched in an afternoon.

The effort is not applied uniformly. Classification by criticality lets a project spend where the consequences are. A ground tool that plots telemetry does not need MC/DC. The fault protection of the previous lesson does.

A practical example: one decision, three coverage levels

A requirement states that the software shall shed non-essential loads when load shedding is armed and either battery voltage is low or the ground has commanded it. The code contains one decision:

armed && (voltageLow || commanded)

Four tests are derived from the requirement.

TestarmedvoltageLowcommandedExpected outcome
1truetruefalseShed
2truefalsefalseDo not shed
3truefalsetrueShed
4falsetruefalseDo not shed

Test 1 alone gives statement coverage. Tests 1 and 2 give decision coverage. MC/DC needs all four, because each condition must be shown to matter independently. Tests 1 and 2 differ only in voltageLow, tests 2 and 3 only in commanded, and tests 1 and 4 only in armed, and in each pair the outcome changes.

Now suppose the developer forgot the ground command and wrote armed && voltageLow. Tests 1 and 2 both pass, and they achieve full statement and decision coverage of the faulty code. Test 3 fails. The stronger criterion forced a test for each condition named in the requirement, and that test exposed the omission.

Verification ends at launch, but the software's life does not. The next lesson covers how software is changed and operated safely in orbit, and what two well-known failures teach.

Key takeaways

  • Tests are derived from requirements, and every requirement, test and piece of code is linked. A requirement with no test is unverified, and code with no requirement is unexplained.
  • Structural coverage measures what the requirements-based tests exercised. Its purpose is to expose gaps, and more critical software is held to stronger criteria.
  • Static analysis and coding standards such as the Power of Ten rules and MISRA C restrict the language to a subset that tools and reviewers can check.
  • Independent verification and validation is done by people who are technically, managerially and financially separate from the developers, so that they do not share the developers' assumptions or pressures.

Knowledge check

Check your understanding. These questions are not graded and you can retry as often as you like.

Question 1 of 3· Select one answerA coverage report shows a block of flight code that no requirements-based test executed. What is the right first response?
Question 2 of 3· Select all that applyWhich characteristics make a verification organization independent in the sense used for IV&V? Select all that apply.
Question 3 of 3· Select one answerA developer writes tests by reading the implementation and asserting whatever each function currently returns. The suite reaches full decision coverage. What has been demonstrated?

0 of 3 questions answered.

Glossary

Traceability

Recorded links between requirements, design, code, tests and results, followed in both directions to show that everything required is tested and everything built is required.

Structural coverage

A measure of how much of the code's structure, such as its statements or decisions, was executed by a set of tests.

Modified condition/decision coverage

A coverage criterion requiring tests to show that each condition in a decision can, on its own, change the decision's outcome. Abbreviated MC/DC.

Static analysis

Examination of source code by tools without running it, to find defects such as possible overflows, out-of-bounds accesses and violations of coding rules.

Coding standard

A set of rules restricting how a programming language may be used on a project, intended to avoid error-prone constructs and make code easier to analyze.

Independent verification and validation

Verification and validation performed by an organization that is technically, managerially and financially independent of the developer. Abbreviated IV&V.

References and further reading

Finished this lesson?

Loading your progress…

Lesson version 1.0.0.