Abstract
As semiconductor technology approaches the physical limits of silicon, hardware is increasingly susceptible to transient "soft errors" such as random bit flips. While developers have designed application-specific fault tolerance (ASFT) mechanisms to mitigate these errors, formally verifying their correctness remains a significant challenge. This paper introduces Leto, a verification system that allows developers to programmatically define custom hardware fault models and formally prove that applications maintain safety and accuracy despite hardware failures. By employing a novel Asymmetric Relational Hoare Logic, Leto relates reliable program executions to unreliable ones, enabling the automated verification of complex, self-stabilizing algorithms.
Introduction
The reliability of modern computing is under threat from the physical realities of shrinking transistors. Factors such as cosmic rays, manufacturing variations, and aging lead to unpredictable bit flips in arithmetic and memory operations. Traditionally, hardware-level solutions like Triple Modular Redundancy (TMR) have been used to ensure reliability, but these methods are often too power-intensive and slow for modern performance requirements.
In response, researchers have turned to Application-Specific Fault Tolerance (ASFT). ASFT involves designing algorithms that are inherently resilient—such as iterative numerical solvers that converge despite occasional errors—or adding lightweight software checks like checksums. However, reasoning about these mechanisms is notoriously difficult. Standard verification tools typically assume a perfect execution environment, leaving a gap in our ability to prove that software remains safe and accurate under faulty conditions. Leto fills this gap by treating the hardware execution model as a first-class component of the verification process.
The Leto Framework
Leto is a programming language and verification engine designed to bridge the gap between hardware uncertainty and software reliability. It introduces several technical innovations to make the verification of faulty executions tractable.
First-Class Execution Models
In Leto, the hardware's behavior is not a fixed assumption but a programmable specification. Developers can define specific fault models, such as a "Single Event Upset" (SEU), where a specific operation (e.g., multiplication) might return an incorrect value exactly once during a program's execution. This flexibility allows software to be verified against diverse threats, from random cosmic rays to targeted Rowhammer-style memory attacks.
Asymmetric Relational Hoare Logic
Traditional Hoare Logic proves properties about a single execution of a program. Leto introduces Asymmetric Relational Hoare Logic, which simultaneously reasons about two versions of the same program: the "original" (reliable) execution and the "relaxed" (unreliable) execution.
The core insight is that we do not need to re-prove the correctness of the original algorithm. Instead, Leto focuses on non-interference: proving that if the reliable version is safe, the faulty version will also remain safe and its final result will remain within a defined tolerance (e.g., abs(original - relaxed) < epsilon).
Automated Verification and Invariant Inference
To reduce the manual burden on developers, Leto translates programs into logical constraints that are solved using the Z3 SMT solver. A key feature is its use of a Houdini-style algorithm to automatically infer loop invariants. This automation is critical for complex algorithms where manual annotation of every possible state under fault conditions would be prohibitive.
Evaluation and Results
The researchers evaluated Leto on four sophisticated algorithms known for their resilience:
- Jacobi Iterative Method: A standard linear system solver.
- Self-Stabilizing Conjugate Gradient (SS-CG): A complex iterative solver designed to recover from errors.
- Self-Stabilizing Steepest Descent (SS-SD): An iterative solver utilizing dual-modular redundancy for critical steps.
- Self-Correcting Connected Components (SC-CC): A graph algorithm that detects and recomputes erroneous memory writes.
Key Findings
- Formal Proofs of Stability: Leto successfully proved self-stability and accuracy bounds for all benchmarks under various fault models.
- Efficiency of Automation: The system significantly reduced manual effort. For example, in the Jacobi method, Leto automatically inferred 30 invariants, requiring only 16 manual annotations from the developer.
- Performance: Verification times were practical for real-world development, ranging from less than a second for simple kernels to approximately 2.6 minutes for the complex SC-CC algorithm.
Discussion and Limitations
While Leto represents a major step forward, it currently focuses on data-plane reliability. It assumes that the program's control flow (instruction pointers and branching) remains reliable, modeling faults only in data processing and memory. Future work is required to address "instruction pointer" faults that could lead to arbitrary jumps in execution.
Additionally, the reliance on SMT solvers introduces some scaling challenges. Complex non-linear constraints can occasionally cause the Z3 solver to time out, and the invariant inference engine hit memory limits on the most complex benchmarks (SS-SD), suggesting a need for more memory-efficient inference algorithms in the future.
Conclusion
Leto provides a powerful new tool for the era of unreliable hardware. By decoupling the hardware fault model from the software logic and utilizing asymmetric relational reasoning, it allows developers to build and verify the next generation of resilient applications with mathematical rigor.
Summary updated