AeroCoder
Open the tools

DO-178C HANDBOOK · CONTENTS

DO-178C HANDBOOK

/

Development

Writing Verifiable Requirements

Characteristics of good requirements, patterns and anti-patterns, with worked rewrites.

Desk summary

  • 01A requirement is good when two independent teams — one building, one testing — would read it the same way and agree on pass or fail.
  • 02The classic characteristics: atomic, complete, concise, consistent, correct, implementation-free, necessary, traceable, unambiguous, verifiable and feasible.
  • 03Most defects come from a handful of patterns: unquantified words, compound statements, missing abnormal cases, design detail in the requirement, and pronouns or “and/or” that hide two meanings.
  • 04Every requirement should carry rationale, and every derived requirement a justification written for the safety team, not for the coder.
  • 05A sentence template (condition → actor → “shall” → response → performance) catches most problems before review.

Intuition

The two-team test

Hand the requirement to a designer in one room and a tester in another. If the designer could build two different behaviours that both look compliant, or the tester cannot decide what result means “pass”, the requirement is not finished. Nearly every rule in this topic is a way of passing that test.

Characteristics of a good requirement

Atomic

States one thing. One “shall”, one identifier, one set of tests. If a requirement can half-pass, it is two requirements.

Complete

Says what happens in every relevant condition, including invalid inputs, mode transitions, power-up and failure states.

Concise

Contains only what is needed to define the behaviour. Background goes into rationale.

Consistent

Does not contradict another requirement, uses defined terms the same way everywhere, and uses the same units and sign conventions.

Correct

Accurately reflects the parent requirement and the physics of the system — right values, right units, right ranges.

Implementation-free

Describes observable behaviour at the right level, not the internal mechanism (unless the mechanism is itself the requirement, as with a mandated control-law algorithm).

Necessary

Removing it would leave a gap: something a parent asks for, a safety need, or a justified derived behaviour.

Traceable

Uniquely identified and linked to its parent, or flagged as derived with justification.

Unambiguous

Admits exactly one interpretation by a competent reader in the domain.

Verifiable

A finite, practical test, analysis or review can show whether it is met, with tolerances where measurements are involved.

Feasible

Achievable on the target hardware within its timing, memory and accuracy limits — the root of Table A-3 objective 3.

Anatomy of a well-formed requirement

Most requirement standards adopt a sentence pattern. A widely used one is a variant of the Easy Approach to Requirements Syntax (EARS): an optional trigger or state, the responsible software item, the word “shall”, the response, and a performance clause. Patterns do not make requirements correct, but they make omissions visible — an empty performance clause stands out.

Sentence patterns with avionics examples

PatternTemplateExample
Always-onThe <item> shall <response> <performance>.The FCC software shall compute the pitch rate command every 10 ms.
Event-drivenWhen <trigger>, the <item> shall <response> within <time>.When the autopilot disconnect switch input transitions to pressed, the AP software shall set AP_ENGAGED to false within 50 ms.
State-drivenWhile <state>, the <item> shall <response>.While the aircraft is on ground, the flap software shall inhibit the flap load-relief function.
Unwanted behaviourIf <abnormal condition>, then the <item> shall <response>.If the left and right flap position differ by more than 3.0° for more than 200 ms, then the flap software shall set FLAP_ASYM true and command the flap brake on.
Optional featureWhere <option is fitted>, the <item> shall <response>.Where the auxiliary fuel tank option is enabled in the configuration data, the fuel software shall include the auxiliary tank quantity in total fuel.

Practitioner tip

Specify interfaces once, in a table

Signal tables — name, units, range, resolution, sign convention, rate, validity indication — are the most efficient way to specify inputs and outputs, and they are easy to review. The reference helicopter project does this for its pilot-control and AHRS inputs. Reference the table from functional requirements rather than restating values, because every restatement is a chance for inconsistency.

Worked rewrites: before and after

The examples below are typical of what review comments look like in practice. Several are modelled on statements in a real model-based reference project; the rewrites show what a reviewer would push for. Values in the rewrites are illustrative and would have to come from the system requirements or safety analysis.

1. A validity check that cannot be tested

Before

▸Prior to using the data from an AHRS, the flight control software shall verify the AHRS data is valid.
▸Problem: “valid” is undefined. A tester cannot construct an invalid case, and two designers would implement different checks.

After

▸HLR-A: The FCC software shall declare AHRS n invalid when its bus validity bit is 0.
▸HLR-B: The FCC software shall declare AHRS n invalid when no new message has been received from it for more than 3 consecutive 10 ms frames.
▸HLR-C: The FCC software shall declare AHRS n invalid when any of pitch attitude, roll attitude or body rates lies outside the ranges defined in Table AHRS-IN.
▸HLR-D: The FCC software shall use only AHRS declared valid as inputs to the voting function.

2. The missing abnormal case

Before

▸When three AHRS are valid, use the middle value. When two are valid, use the average. When one is valid, use that sensor.
▸Problem: zero valid sensors is not specified. The design will output something, and whatever it is becomes unassessed, untested behaviour.

After (adds one requirement)

▸Keep the three existing requirements.
▸Add: When no AHRS is valid, the FCC software shall hold each voted parameter at its last voted value and set AHRS_VOTE_FAIL true within one 10 ms frame.
▸Flag it derived if the system requirements are silent, and send it to the safety team, who may prefer a different response.

3. Design hiding in a requirement

Before

▸Each hydraulic actuator loop shall be implemented as a PID control loop operating at a 1 ms frame rate with gains Kp, Ki, Kd.
▸Problem: “implemented as” prescribes the mechanism. Is the requirement the PID structure, or the actuator performance the system asked for (bandwidth, damping, tracking error)?

After (two honest options)

▸Option A, performance HLR: The actuator position loop shall achieve at least 10 Hz bandwidth, damping of at least 0.4, and steady-state tracking error within 5% of the commanded position.
▸Option B, mandated algorithm: if the control-law team designed and validated the PID at system level, keep it as a specified algorithm — but say so in the rationale, give the discrete form and sample time, and verify it under Table A-3 objective 7 (algorithms are accurate).

Note

When algorithms legitimately belong in HLRs

Control laws, filters and voting schemes are often designed and validated by a systems or flight-controls team and handed to software as fixed algorithms. In that case the algorithm is the requirement, and stating it is not a design intrusion. The test is ownership: who validated it and who is allowed to change it? If the software team could legitimately choose a different structure that meets the same performance, the structure belongs in the design.

Quick rewrites of common defects

BeforeDefectAfter
The software shall quickly detect flap asymmetry.Unquantified time and threshold.If left and right flap angles differ by more than 3.0° for more than 200 ms, the software shall set FLAP_ASYM true.
The FMS shall compute and display fuel remaining and warn the crew when it is low.Three requirements in one; “low” undefined.Split into: compute fuel remaining (with accuracy); output it to the display bus label X at 5 Hz; set LOW_FUEL when fuel remaining is below the configured reserve threshold.
When airspeed or altitude is invalid, it shall be set to the last valid value.“It” is ambiguous; “or” hides two cases.Two requirements, one per parameter, each naming the output and the maximum hold time.
The software shall not engage the autopilot unless conditions are safe.Negative form plus undefined “safe”.The AP software shall reject an engage request while any of the conditions in Table AP-INH is true. (Table lists each inhibit condition.)
The display shall be updated as fast as possible.Not verifiable; no lower bound.The software shall update the primary attitude display data at least every 20 ms.
The software shall handle ARINC 429 parity errors.“Handle” describes no behaviour.If a received label has a parity error, the software shall discard that word and retain the previous value of the parameter.
Altitude shall be computed per the standard atmosphere (TBD).Open TBD at review.Resolve before formal review, or record the TBD with an owner and closure date and do not baseline the requirement.

Words that make requirements untestable

Reviewers keep a list of weak words. They are not forbidden — sometimes they appear in rationale — but each one in a “shall” statement is a sign that a number, a condition or a definition is missing.

Weak word or constructWhy it failsReplace with
quickly, fast, timely, as soon as possibleNo bound to test against.A maximum time with a tolerance, measured from a defined event.
approximately, about, sufficient, adequateNo pass/fail threshold.A value with explicit tolerance or a minimum.
support, handle, process, manageNames no observable behaviour.The specific output, state change or response.
user-friendly, intuitive, clearSubjective.Human-factors criteria or a referenced display standard.
and/or, the slash (left/right)Two meanings.Separate requirements, or “either … or … but not both” stated explicitly.
it, they, thisAmbiguous referent.Repeat the noun.
unless, except, butUsually hides a second requirement.A separate requirement for the exception case.
etc., including but not limited toOpen-ended set.A closed, enumerated list.
shall not (negative)Infinite set of things to test for absence.A positive inhibit or limit statement. Keep negatives only for genuine safety constraints that analysis can verify.
maximise, minimise, optimiseNo target.A required value or limit.

Pitfall

“Implemented as …”, “using a …”, “by calling …”

These phrases almost always mean design has leaked into the HLR. The consequences are practical: the HLR review becomes a design review, the requirement changes every time the design changes, and requirements-based tests end up testing structure rather than behaviour. Ask “what would the pilot, the bus or the actuator observe?” and write that instead.

Writing derived requirements and rationale for the safety reader

The safety analyst who reads your derived requirement probably does not know your design. The justification has to stand on its own: what the requirement does, why it is needed, what the alternative would have been, and what effect it has at the system boundary. The FAA Requirements Engineering Management Handbook gives similar advice for all rationale: capture it when the requirement is written, explain where each value comes from, keep it short, and never put required behaviour in it.

Worked example

A derived requirement written to be assessed

ID: HLR_FQ_047 (derived). Text: If a fuel probe reading is declared invalid, the fuel software shall use the last valid reading of that probe for up to 2.0 s, then exclude the probe from the tank calculation and set PROBE_FAIL[n]. Rationale: Probe signals drop out briefly during electrical bus transfers (up to 1.2 s per the electrical ICD). Without the hold, displayed fuel would step down and back during every transfer. System effect: For up to 2 s the displayed quantity may not reflect a genuine fuel loss at the affected probe. Safety disposition: to be recorded by the safety team.

  • —Robustness is a requirement, not a test technique. For each input, ask what happens if it is out of range, stale, frozen, missing, or arrives too often — and write the answer down. Testers can then trace robustness tests to requirements instead of inventing behaviour.
  • —Every mode, every transition. Write down the conditions to enter and leave each mode, and what the outputs do during the transition frame.
  • —Power-up and reset. Initial values of every output and the time until outputs are valid are common omissions.
  • —Units and frames. State units, sign conventions and axes once in a definitions section and use them everywhere.

A requirement review checklist

Before you send requirements to formal review

0/10

Model-based development

Writing requirements around models

When the HLRs are a specification model, the same qualities apply to the model: each element that expresses required behaviour must be unambiguous (sample times, data types, initial conditions and saturation explicitly set rather than inherited by default), and the model must be traceable to the textual requirements above it. When textual HLRs sit above a design model, resist the temptation to write HLRs that simply describe the blocks (“the output shall be the gain times the input”). Write the behaviour and performance the model must achieve; the model review then checks that it does. A model-based project still needs the abnormal cases written down — a model will happily produce an output for a case nobody thought about, as the zero-valid AHRS example shows.

Self-check

Which rewrite of “The software shall respond quickly to an autopilot disconnect” is best?

Sources & further reading

  • Rierson, Developing Safety-Critical Software (2013), ch. 2 and ch. 6 (§6.7)
  • Lempia & Miller, Requirements Engineering Management Handbook, DOT/FAA/AR-08/32 (2009)
  • Lempia & Miller, Requirements Engineering Management Findings Report, DOT/FAA/AR-08/34 (2009)
  • Mavin et al., Easy Approach to Requirements Syntax (EARS), IEEE RE 2009
  • DO-178C §5.1, §6.3.1, §11.6, §11.9; Annex A Table A-3
  • Model-based DO-178C/DO-331 reference project (helicopter FCC): software and system requirement reports

← Previous

Software Requirements (HLR)

Development

Next →

Software Design: Architecture & LLR

Development

On this page

Characteristics of a good requirementAnatomy of a well-formed requirementWorked rewrites: before and afterWords that make requirements untestableWriting derived requirements and rationale for the safety readerA requirement review checklist