On the probability of perfection of software-based systems

Xingyu Zhao

This blog post summarizes the doctoral thesis "On the probability of perfection of software-based systems" by Xingyu Zhao (2016).

TL;DR

This research provides a rigorous mathematical framework for claiming that a software system is "perfect" (fault-free) rather than just highly reliable. By using conservative Bayesian reasoning, it allows safety engineers to combine evidence from testing, development history, and formal proofs to justify the ultra-high dependability required for critical systems like aircraft or nuclear reactors.

What Problem Does This Paper Address?

In safety-critical industries, systems often require a "probability of failure on demand" ($pfd$) as low as $10^{-9}$. Proving this via standard "black-box" testing is impossible—you would need to run the software for hundreds of years without a single failure to gain enough statistical confidence.

Furthermore, many safety systems use a "1-out-of-2" (1oo2) architecture, where two different software channels perform the same task. If they were truly independent, you could just multiply their failure rates. However, research shows that diverse software teams often make similar mistakes, leading to "dependent failures."

This thesis tackles these challenges by focusing on the probability of perfection. If we can argue that one channel in a redundant system is simple enough to potentially be "perfect" (fault-free), the math for system reliability becomes much more robust and avoids the "dependency" trap.

Methods

The author builds upon the Littlewood-Rushby (LR) and Littlewood-Povyakalo (LP) models, extending them from general populations to specific, individual systems. Key techniques include:

  • Conservative Bayesian Inference: Instead of requiring experts to provide a complete, complex probability distribution (which is notoriously difficult), the models work with "partial priors"—simple statements like "I am 95% confident the failure rate is below X."
  • The "Pruning" Idea: To prevent the models from being too conservative (and thus useless), the author introduces a way to discard "unreasonable" mathematical distributions that no sane engineer would actually believe.
  • Quasi-Perfection: A novel mathematical relaxation. Instead of "pure" perfection (zero failures forever), it defines "quasi-perfection" as a failure rate so tiny ($\epsilon$) that the software is effectively perfect over its entire operational lifetime.
  • Formal Verification Modeling: A new approach to quantify the confidence gained from formal mathematical proofs, accounting for the fact that the "prover" tool itself might have bugs or the "specification" might be incomplete.

Datasets

As a theoretical thesis in software reliability engineering, this work does not use a new empirical dataset. Instead, it uses illustrative numerical examples to demonstrate how the models behave. It also references and builds upon data from classic software diversity experiments, such as the Knight & Leveson (1986) study and the PODS/STEM projects, to justify its assumptions about failure dependence.

Key Insights and Ideas

  • Testing is Weak for Perfection: A major "aha moment" is the proof that even an infinite number of successful tests cannot make you 100% certain a program is perfect. There is always a mathematical possibility that the program is just extremely reliable but not fault-free.
  • The Power of "Weaker" Claims: By shifting the goal from "pure perfection" to "quasi-perfection," testing evidence becomes exponentially more powerful. If you only need to prove the software won't fail during its 50-year lifespan, the required number of test runs becomes practically achievable.
  • Subjective vs. Objective: The thesis clarifies a common confusion in the field: the difference between an objective property of a population (e.g., "10% of programs produced by this team are perfect") and subjective confidence in a single program (e.g., "I am 90% sure this program is perfect").
  • Negotiation Framework: The author proposes a "negotiation model" where regulators and developers can debate specific, transparent parameters (like "doubt" factors) rather than arguing over a single, opaque safety number.

Key Results

  • Mathematical Proofs: The thesis provides proofs for the "most conservative" prior distributions, ensuring that any safety claim made using these models is a "guaranteed" lower bound on reliability.
  • Quasi-Perfection Superiority: Numerical examples show that for large amounts of evidence (e.g., $10^8$ failure-free runs), the quasi-perfection model provides significantly higher confidence (99.99%) compared to the pure perfection model (approx. 50%) for the same system.
  • Formal Proof Utility: The model in Chapter 6 demonstrates that formal verification is most useful when the "compliance" of the code is not already assumed to be high; if you are already certain the code matches the spec, the proof adds no new information.

Limitations and Future Work

  • Excessive Conservatism: Because the models are designed to be "safe" for nuclear-grade systems, they can sometimes produce results so pessimistic they are hard to use in commercial settings without the "pruning" step.
  • The $\epsilon$ Problem: The quasi-perfection model relies on choosing a value for $\epsilon$ (the "good enough" threshold). The author notes that a more rigorous way to choose this value is needed.
  • Elicitation Difficulty: While the models simplify the inputs needed from experts, it is still challenging for humans to provide accurate "partial priors" without bias.
  • Expanding Formal Evidence: The current model focuses on theorem proving. Future work is suggested to incorporate "model checking" and symbolic execution into the same Bayesian framework.

Summary updated

BibTeX
@inproceedings{zhao2016probability,
  author = {Xingyu Zhao},
  title = {{On the probability of perfection of software-based systems}},
  booktitle = {Undefined},
  year = {2016},
  url = {https://openreview.net/forum?id=UyVLqcjVkrX},
}
Figure