Foundations to Frontier
Tests
M. Robust, Verifiable and Onboard AI › M2 Verification and Assurance

Certification Standards for Safety-Critical Software

Safety-critical software is certified against standards that turn a hazard assessment into an integrity level and the integrity level into required processes and evidence. This overview covers the main families: DO-178C and its companions in aviation, ISO 26262 and SOTIF for road vehicles, IEC 61508 and its derivatives for industrial, rail and medical systems, and ECSS and NASA standards for space, together with the emerging guidance for machine learning. The exercises compute what these standards compute: ASILs from severity, exposure and controllability, SILs from failure rates and redundancy, and MC/DC structural coverage, which Exercise 2 compares with weaker criteria by fault injection.

Level 0: Foundation

★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.

Rules for software that must not fail

Software that flies aircraft, brakes cars or shuts down chemical plants is not allowed into service just because its developers trust it. Industry standards say how much rigour is needed, depending on how bad a failure could be. The worse the possible accident, the higher the integrity level, and the more planning, reviewing, testing and independent checking the standard demands. A key idea is that tests must exercise the logic thoroughly: for the most critical aircraft software, every condition in every decision must be shown to affect the outcome on its own.

🎮 Verification lab

ISO 26262: severity S3, exposure E4, controllability C3 → ASIL D (S + E + C = 10 gives D, 9 C, 8 B, 7 A, any class 0 or a lower sum QM).

IEC 61508 (low demand): one channel PFDavg 4.38e-3 → SIL 2; two redundant channels (1oo2) with 5% common-cause failures 2.42e-4 → SIL 3.

DO-178C structural coverage for the decision A ∧ (B ∨ C): pick test vectors.

4 tests. Decision coverage: yes; condition/decision: yes; MC/DC: no (A ✗, B ✓, C ✓). MC/DC needs n + 1 = 4 tests here, against 8 for all combinations.

Why engineers care

DO-178C Level A software must meet 71 objectives, including MC/DC structural coverage of the code.

📝 Quick check (Level 0)
0/3 answered
  1. 1. Integrity levels are set by…
  2. 2. Higher integrity levels demand…
  3. 3. For the most critical aircraft software, tests must show that…

Level 1: Beginner

★★☆☆☆ Basic⏱ 20 minSecondary-school mathematics: arithmetic and elementary algebra.

By hand

  • Aviation: ARP4754A/B (system development) and ARP4761 (safety assessment: FHA, PSSA, SSA, fault trees) classify failure conditions as catastrophic, hazardous, major, minor or no safety effect, with probability targets per flight hour of 10⁻⁹, 10⁻⁷, 10⁻⁵ and about 10⁻³ (AMC/AC 25.1309). Software follows DO-178C (Levels A to E), hardware DO-254; supplements cover tool qualification (DO-330), model-based development (DO-331), object-oriented methods (DO-332) and formal methods (DO-333).
  • Road vehicles: ISO 26262 derives an ASIL (QM, A to D) from severity S, exposure E and controllability C in a hazard analysis and risk assessment; ISO 21448 (SOTIF) covers hazards from functional insufficiencies such as perception limits; ISO/PAS 8800 addresses AI.
  • Industry: IEC 61508 defines SIL 1 to 4 by probability of dangerous failure; sector standards include IEC 61511 (process), EN 50128 and EN 50716 (railway) and IEC 62304 (medical software).
  • Space: ECSS-E-ST-40C and ECSS-Q-ST-80C with software criticality categories A to D; NASA NPR 7150.2 and NASA-STD-8739.8.
  • Structural coverage: statement, decision, condition/decision and MC/DC (each condition shown to independently affect the decision); DO-178C requires MC/DC at Level A, decision coverage at B and statement coverage at C.
  • Machine learning: EASA’s AI concept paper, the SAE G-34 / EUROCAE WG-114 work and UL 4600 add learning assurance: data management, generalisation evidence, and monitoring in service.
📝 Quick check (Level 1)
0/3 answered
  1. 1. DO-178C Level A requires…
  2. 2. An ASIL is derived from…
  3. 3. SOTIF addresses…

Level 2: Intermediate

★★★☆☆ Intermediate⏱ 25 minUndergraduate students and practising engineers.

Integrity levels and coverage

Exercise 1.

  • Boolean decisions as and/or/not trees with truth tables; decision, condition, condition/decision and unique-cause MC/DC coverage of a test set.
  • Independence pairs for each condition, a greedy MC/DC test-set builder, and an exhaustive search for the minimum.
  • The ISO 26262 ASIL table through its sum rule.
  • IEC 61508 average probability of failure on demand for one channel and for two redundant channels with common-cause failures, and the SIL it corresponds to.

Practice.

  • Classify hazards first: the integrity level comes from the hazard analysis, not from the code; changing the operating domain can change it.
  • Plan for certification from the start: plans, standards, requirements traceability and configuration management are objectives in their own right.
  • Use MC/DC as an adequacy check of requirements-based tests, not as a goal for generating tests; uncovered code points to missing requirements or dead code.
  • Treat redundancy claims with care: decomposition and redundant channels count only with demonstrated independence.
  • For learned components, follow the emerging guidance (EASA concept paper, ISO/PAS 8800, UL 4600) and combine it with verification, monitoring and a safety case (topics M2-1 to M2-5).
def independence_pairs(e, n):          # for each condition i
    tab = truth table of e over all 2^n inputs
    pairs[i] = [(t, t with i flipped) for t with t[i] = 0
                if tab[t] != tab[t with i flipped]]

def mcdc_greedy(e, n):                  # small MC/DC test set
    T = set()
    while some condition has no pair inside T:
        i = that condition with fewest pairs
        add the pair of i that adds fewest new tests to T

def asil(S, E, C):
    return QM if 0 in (S, E, C) else {10: D, 9: C, 8: B, 7: A}.get(S + E + C, QM)
🐍 Exercise 1: coverage criteria, ASIL and SIL
Implement structural coverage criteria including MC/DC, an MC/DC test-set builder, the ASIL table and IEC 61508 failure-on-demand calculations.
📝 Quick check (Level 2)
0/3 answered
  1. 1. MC/DC should be used as…
  2. 2. The integrity level comes from…
  3. 3. Redundancy claims require…

Level 3: Advanced

★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.

Theory

Why MC/DC needs only about n + 1 tests. For each of n conditions, MC/DC needs two tests that differ only in that condition and give different outcomes. In an and/or decision where each condition appears once, a single test with the decision true can serve as one half of the pair for many conditions at once (in A ∧ B ∧ C, the all-true test pairs with each single-false test), so n + 1 tests are often enough (in Practice 1 they always were); at least n + 1 are needed because n pairs over fewer tests would leave some condition without a pair. Exhaustive testing needs 2ⁿ.

Why MC/DC detects simple faults. If a condition is stuck, negated or connected through the wrong operator, then in at least one context where that condition determines the decision the faulty decision differs from the correct one. MC/DC guarantees that for every condition such a determining context is tested, so these single faults change the result of some test. Decision coverage only requires both outcomes, which two tests can give without ever showing that most conditions matter.

Why the ASIL is a sum and SIL a decade. ISO 26262 assigns S1 to S3, E1 to E4 and C1 to C3 so that each step up in a class roughly corresponds to a factor in risk; the ASIL table is equivalent to adding the class numbers, with 10 for ASIL D and each step down one level. IEC 61508 defines each SIL as a decade of the probability of dangerous failure. For a single channel proof-tested every T hours, the average probability of failure on demand is λT/2; two redundant channels give (λT)²/3 for independent failures, but a common-cause fraction β adds βλT/2, which soon dominates. Standards therefore cap the credit for redundancy with architectural constraints.

📝 Quick check (Level 3)
0/3 answered
  1. 1. At least how many tests does MC/DC need for n conditions?
  2. 2. The ASIL table is equivalent to…
  3. 3. With common-cause failures, the PFD of a redundant pair is dominated by…

Level 4: Expert

★★★★★ Expert⏱ 30 minResearchers: original papers and open problems.

How many faults do test sets meeting decision, condition/decision and MC/DC coverage detect, compared with random tests of the same size?

History.

  • RTCA published DO-178 in 1982, DO-178B in 1992 and DO-178C in 2011; DO-254 for airborne hardware followed in 2000.
  • J. Chilenski and S. Miller (1994) analysed the applicability of MC/DC; K. Hayhurst and colleagues (2001) wrote NASA’s practical tutorial on it.
  • IEC 61508 was published from 1998 (second edition 2010); ISO 26262 adapted it to road vehicles in 2011 (second edition 2018), and ISO 21448 (SOTIF) followed in 2022.
  • ECSS issued its software engineering and product assurance standards from 1996 onwards; the current ECSS-E-ST-40C and ECSS-Q-ST-80C date from 2009 (with later revisions).
  • EASA published its artificial intelligence roadmap (2020) and concept paper on machine-learning applications (2021, updated 2024); ISO/PAS 8800 appeared in 2024.

Exercise 2.

  • 150 random and/or decisions with 3, 5 and 8 conditions (each used once, 30% negated).
  • Single-fault mutants: and/or swapped at one node, a negation added or removed, a condition stuck at true or false; mutants equivalent to the original are discarded.
  • Test sets: decision coverage (one true and one false test), condition/decision coverage (random tests until it holds), MC/DC (greedy) and random tests as many as the MC/DC set. A mutant is detected if some test gives a different outcome.

Seed 0 (mean test-set size, share of mutants detected):

conditions decision condition/decision MC/DC random, same size
3 2.0, 0.590 4.3, 0.768 4.0, 1.000 4.0, 0.679
5 2.0, 0.459 7.6, 0.634 6.1, 1.000 6.1, 0.555
8 2.0, 0.325 16.0, 0.481 9.4, 1.000 9.4, 0.448

Seeds 1 and 2: MC/DC detected every mutant with 4.0, 6.1 and 9.5 tests on average; decision coverage detected 0.613 and 0.622, 0.461 and 0.442, 0.312 and 0.325; condition/decision coverage 0.768 and 0.795, 0.644 and 0.631, 0.488 and 0.473; random tests 0.708 and 0.710, 0.556 and 0.541, 0.467 and 0.485.

Findings.

  • MC/DC detected every single fault in every seed with about n + 1 tests: 4.0, 6.1 and 9.4 to 9.5 tests, against 8, 32 and 256 for exhaustive testing.
  • Decision coverage detected only 31% to 62% of the faults, less as decisions grew.
  • Condition/decision coverage was not much better (47% to 80%), although it used more tests than MC/DC at 5 and 8 conditions (up to 16.1 on average): covering both values of each condition does not show that each one matters.
  • Random tests of the MC/DC size detected 45% to 71%: the benefit comes from choosing tests that isolate each condition, not from the number of tests.
  • The result is for simple faults in decisions with single-use conditions; MC/DC is an adequacy criterion for tests derived from requirements, and it says nothing about missing requirements or about learned components.
🐍 Exercise 2 (research): how many faults do test sets meeting decision, condition/decision and MC/DC coverage detect, compared with random tests of the same size?
Compare the fault-detection power of decision, condition/decision and MC/DC test sets with random tests of the same size.

Certification in practice

  • Tools: coverage analysers (VectorCAST, LDRA, Rapita RVS) measure MC/DC on target; qualified code generators (SCADE KCG) and formal tools (Astrée, Frama-C, SPARK) are used with DO-330 tool qualification and DO-333 credit.
  • Process evidence: plans (PSAC, SDP, SVP, SCMP, SQAP), traceability from system requirements to code and tests, reviews with independence at the higher levels, and a final accomplishment summary.
  • Learned components: no standard yet certifies a neural network at the highest levels on its own; current approaches restrict ML to lower criticality, wrap it with runtime assurance (topic M2-4), or bound its behaviour by verification (M2-1 to M2-3) inside a safety case (M2-5). Reliability of the hardware underneath is the subject of section M3.

References

  1. RTCA DO-178C / EUROCAE ED-12C (2011). “Software considerations in airborne systems and equipment certification.”
  2. K. Hayhurst, D. Veerhusen, J. Chilenski and L. Rierson (2001). “A practical tutorial on modified condition/decision coverage.” NASA/TM-2001-210876.
  3. J. Chilenski and S. Miller (1994). “Applicability of modified condition/decision coverage to software testing.” Software Engineering Journal.
  4. ISO 26262 (2018). “Road vehicles: functional safety.”
  5. IEC 61508 (2010). “Functional safety of electrical/electronic/programmable electronic safety-related systems.”
  6. EASA (2024). “Concept paper: guidance for level 1 and 2 machine learning applications.”