Abstract
In the development of complex real-time systems, formal verification has historically acted as a "black box," providing binary feedback that offers little insight into system failures. This paper presents a diagnostic feature for UPPAAL, a tool designed to bridge this "explanation gap." By automatically generating step-by-step diagnostic traces (counter-examples), the tool allows developers to pinpoint subtle timing errors and logical flaws in time-sensitive protocols, transforming the model checker into a powerful debugging instrument.
The Challenge of Real-Time Verification
As formal verification transitioned from academic theory to industrial application in the mid-1990s, a significant hurdle emerged: the lack of diagnostic feedback. For real-time systems, where errors often hinge on millisecond-level timing discrepancies, a simple "No" from a verification tool is insufficient. Engineers need to know why a system failed to meet its safety or liveness properties.
The authors address this by championing the principle of WYDVYAE ("What You Don’t Verify You Are Explained"). The goal is to provide a concrete execution path that demonstrates exactly how a specification was violated, streamlining the debugging process for complex, distributed networks.
Methodology: Networks of Timed Automata
The UPPAAL tool models systems as Networks of Timed Automata—finite-state machines augmented with real-valued clocks. Properties, such as "the system never deadlocks" or "a response must occur within a specific window," are specified using a timed modal logic.
To handle the infinite state space created by real-valued clocks, the authors implemented a two-phase diagnostic algorithm:
- Symbolic Search: The tool performs a goal-directed search through the symbolic state space. Instead of checking individual time points, it manages sets of possible clock values using constraint-solving techniques.
- Trace Synthesis: If a property violation is detected, the tool backtracks through the search path to synthesize a diagnostic trace. This trace provides a sequence of states, transitions, and specific time delays that lead to the error.
This "on-the-fly" approach avoids the "state-explosion problem" by exploring only the necessary parts of the state space while maintaining the precision required for real-time constraints.
Case Study: The Philips Audio-Control Protocol
The effectiveness of this diagnostic approach was evaluated using the Philips Audio-Control Protocol, a real-world benchmark for communication between audio components. The protocol uses Manchester encoding, where the timing of voltage changes is critical for bit detection.
Using an early, error-prone draft of the protocol, the authors demonstrated how UPPAAL could identify non-trivial bugs:
- Logical Errors: The tool revealed that
output_neq_1andoutput_neq_0labels had been swapped in the protocol description. - Structural Flaws: Diagnostic traces highlighted missing transitions, such as a "head" action followed by an "up" action without the required intervening "input" action.
- Timing Sensitivity: The verification showed that the protocol's correctness was highly dependent on specific tolerances; for instance, a tolerance of exactly $\pm 1/17$ caused the system to fail.
Key Insights: The Power of the Counter-Example
The core contribution of this work is the shift in perspective regarding failed verification. Rather than a failure of the tool, a violation is treated as a "goldmine" of diagnostic information.
- WYSIWYV (What You See Is What You Verify): By providing a graphical interface where users draw automata, the tool ensures that the model being verified is an accurate reflection of the engineer's design.
- Iterative Refinement: The diagnostic traces enable a "verify-debug-fix" loop. Engineers can use the feedback to fix labels, add missing transitions, or adjust timing parameters until the system is formally proven correct.
Results and Performance
The symbolic approach proved highly efficient. On 1996-era hardware (a SparcStation 10), UPPAAL was able to generate complex diagnostic traces for the Philips protocol in just 2.2 seconds. This performance demonstrated that diagnostic model-checking was not only theoretically sound but also practically viable for industrial-scale problems.
Future Directions
While the current implementation is robust, the authors identified several areas for improvement:
- Trace Optimization: Future versions aim to synthesize the shortest possible diagnostic trace to further simplify the debugging process.
- Improved Readability: Enhancing the transformation of symbolic constraints back into concrete, human-readable values.
- Hybrid Systems: Expanding the tool's capabilities to handle linear hybrid automata, which involve more complex continuous variables beyond simple clocks.
Summary updated