Software everywhere
Engineering systems have gone through a digital revolution. Cars, medical devices and industrial control systems that were once mechanical or analog are now defined largely by their software. A modern car carries driver assistance, airbags, ABS, navigation, cruise control and diagnostics, all in code. A modern ventilator is a computer with a pump attached. Instrumentation and control systems in power plants have moved from relays to programmable electronics.
The amount of software keeps growing. A million lines of code is roughly 18,000 printed pages, and large systems now run to many millions of lines. With that growth comes a steady stream of failures, from recalls to accidents, where the root cause is not a broken part but a line of code doing exactly what it was written to do.
Not all systems are equally critical
Dependability requirements depend on what a failure costs.
| Class | What matters | Impact of failure |
|---|---|---|
| Non-critical | Functional correctness desired | Irritation |
| Business-critical | High availability; correctness drives business success | Downtime, financial loss, damage to reputation |
| Security-critical | Security trumps other requirements | Breach of data or control |
| Mission-critical | High reliability; failure-free operation for a given mission | Loss of the mission |
| Safety-critical | High reliability, availability and security together | Serious harm to people or the environment |
The further down this table a system sits, the more evidence is needed before anyone should rely on it.
Why software is different
Systems fail for three reasons. Hardware fails through design and manufacturing errors or because components wear out. Software fails because of errors in its specification, design or implementation. People operating the system make mistakes, and operator error is now perhaps the largest single cause of system failures.
Most engineering practice is built around random failures: a stuck valve, a corroded contact, a broken wire. These can be measured, predicted and handled with redundancy. Software failures are systematic. They occur every time the triggering conditions arise, and adding a second copy of the same software adds the same fault.
Software is also a uniquely complex creation. It is intangible and endlessly malleable. Each component is different, so systems scale up by addition, not replication. The number of possible states is too large to conceive, parts communicate in complex ways, and small changes ripple far. It is very hard to understand a whole system's runtime behavior by examining its components. Fred Brooks observed that turning a program into a programming product, or into a programming system, each multiplies the effort by about three, and doing both by about nine. For a safety-critical product, the multiplier is larger still.
Targets that testing alone cannot reach
Safety-critical industries set extremely demanding targets. In nuclear power, the minimum level is about one failure in 10,000 years, roughly 10⁻⁸ per hour. In automotive, the most demanding integrity levels range from 10⁻⁵ to 10⁻⁹ failures per hour.
Can these numbers be demonstrated by running the software and counting failures? Consider a modest target of 10⁻⁴ failures per hour:
- For 50% confidence, the system must run under varied, strictly controlled conditions for about 10,000 hours without a single failure.
- For 99% confidence, it must run for about 46,000 hours, more than five years.
- Any change to the code means starting again.
At 10⁻⁹ failures per hour, 99% confidence would need around 500,000 years of failure-free operation. For software, a credible failure probability cannot be measured into existence. Confidence has to come from somewhere else.
Qualification: people, process and product
That somewhere else is software qualification: demonstrating that the software complies with recognized standards. It has three parts.
- People qualification: the engineers building and verifying the system have proven competence.
- Process qualification: the development process is rigorous and complies with the standard. This is the main route for critical software and for the tools used to build it.
- Product qualification: the finished software meets defined quality characteristics, measured against models such as ISO/IEC 25010.
The standards behind this were written from experience of hazards and accidents. They cover the entire development lifecycle and set strict requirements on how each activity is carried out. None of them promises error-free software. Applied thoroughly, they raise confidence to a level a society can accept.
The standards
IEC 61508 is the general standard for functional safety of electrical, electronic and programmable electronic systems. It accepts that error-free software is impossible, so it puts safety first in every phase of a rigorously defined safety lifecycle, built on hazard identification, mitigation and risk analysis. Software is assigned a Safety Integrity Level (SIL) from the safety assessment, and the SIL decides how much rigor is required. Sector standards interpret it for their own domains.
ISO 26262 applies functional safety to production cars. Its Automotive Safety Integrity Levels (ASIL) come from three factors: the severity of harm if the system fails, the probability of exposure to a situation where that failure is hazardous, and the controllability of the situation by the people involved.
IEC 62304 sets lifecycle requirements for medical device software, with ISO 14971 for hazard analysis. Each software system is assigned a safety class: Class A where no injury is possible, Class B where non-serious injury is possible, and Class C where death or serious injury is possible. The documentation and verification required grow with the class, from a development plan and requirements for every class up to unit-level architecture, detailed design and full verification for Class C.
IEC 60880 and IEC 62138 govern software in the instrumentation and control systems of nuclear power plants, refined over several editions since 1986.
Other sectors follow the same pattern: EN 50128 for railways, API RP 14C for offshore platforms and ECSS-Q-ST-30 for space systems.
Assessing safety: an insulin pump
Standards rely on structured safety assessment. Two common techniques are Fault Tree Analysis (IEC 61025) and Failure Mode and Effects Analysis (IEC 60812).
Take an insulin pump. A fault tree starts from the hazard, an incorrect insulin dose, and works down through its causes: an incorrect sugar reading, a computation failure, a correct dose delivered at the wrong time, or a delivery failure. Each of these breaks down further, into sensor failure, software error, timer failure, pump signal error or mechanical failure.
An FMEA then scores each failure mode for severity, occurrence and detection, and multiplies them into a risk priority number. An illustrative analysis:
| Component | Failure mode | Effect | Severity | Occurrence | Detection | RPN |
|---|---|---|---|---|---|---|
| Sensor | Fails to detect correct sugar levels | Incorrect dosage | 9 | 4 | 6 | 216 |
| Sugar calculation software | Incorrect computation | Incorrect dose calculated | 8 | 5 | 5 | 200 |
| Timer | Timer failure | Correct dose at wrong time | 7 | 3 | 7 | 147 |
| Pump signal | Signal error | No insulin delivered | 9 | 2 | 4 | 72 |
| Insulin computation | Computation failure | Incorrect dose | 10 | 6 | 3 | 180 |
| Mechanical pump | Mechanical failure | No or incorrect dosing | 8 | 7 | 4 | 224 |
The value is not in the numbers themselves but in the discipline: every failure path is named, ranked and given a control before the device reaches a patient.
How safe is safe enough?
Every one of these targets rests on a question engineers cannot answer alone. What probability of failure should we permit for a reactor's protection system? How much should we spend to avoid a fatal road or rail accident?
This is a social question, not a technical one. From society's answers, economists calculate the implicit Value of a Statistical Life (VSL): the additional cost people are willing to bear for safety improvements that, in aggregate, prevent one death. Ideally a country would use one figure across health and transport, so investment goes where it saves the most lives. In practice the results are highly inconsistent. A road death is often valued lower than a rail death, and values differ widely between countries because of different calculations and different attitudes to risk.
Safety engineering therefore always serves a judgment made by society. The standards turn that judgment into requirements engineers can meet and auditors can check.
The new challenge: AI in critical systems
Artificial intelligence is now entering exactly the domains described above. Software as a Medical Device increasingly includes diagnosis and imaging driven by machine learning. Cars are gaining driver assistance and smart cruise control that depend on learned perception.
This creates a fundamental tension.
Safety standards demand determinism. Their whole approach assumes that requirements can be traced to design and code, that behavior can be specified in advance, and that the same input produces the same output, so that verification evidence remains valid.
AI is inherently non-deterministic. A learned model's behavior comes from data rather than from written requirements. It cannot be traced line by line to a specification. Its outputs can change with small changes in input, and it can change again every time it is retrained.
The established toolkit of SILs, ASILs, safety classes, fault trees and lifecycle evidence does not map cleanly onto a model whose logic no one wrote. The open questions are significant:
- What does a requirement mean for a component that learns its behavior from data?
- Can process qualification extend to how data is collected, labelled and validated?
- What evidence would show that a model behaves safely across the conditions it will meet in operation?
- How should a safety case treat a model that is retrained?
The answers are not yet settled. What is clear is that the people who will answer them need both disciplines: a working command of safety standards and qualification, and a deep understanding of how AI systems are built. Bringing those together is the next chapter of critical systems engineering.
Conclusion
Software has become the defining part of critical systems, and its failures are systematic, complex and impossible to rule out by testing alone. Safety-critical industries answered with qualification: rigorous standards for people, process and product, grounded in structured safety assessment and in society's judgment of acceptable risk. AI now challenges the foundation of that answer. Making AI safe enough for a ventilator, a car or a power plant will take the same rigor, applied to a technology that does not behave like the software the standards were written for.
Quest is a frontier AI lab. This paper reflects our perspective as of May 2024.
info@questlab.pk →