Abstract
Reactive synthesis transforms a specification of a reactive system, given in a temporal logic, into an implementation. The main advantage of synthesis is that it is automatic. The main disadvantage is that the implementation is usually very difficult to understand. In this paper, we present a new synthesis process that explains the synthesized implementation to the user. The process starts with a simple version of the specification and a corresponding simple implementation. Then, desired properties are added one by one, and the corresponding transformations, repairing the implementation, are explained in terms of counterexample traces. We present SAT-based algorithms for the synthesis of repairs and explanations. The algorithms are evaluated on a range of examples including benchmarks taken from the SYNTCOMP competition.
Introduction: The Transparency Gap in Synthesis
In formal methods, reactive synthesis represents a significant milestone: the ability to automatically generate a state machine from high-level requirements written in Linear Temporal Logic (LTL). For instance, a requirement like "every request must eventually receive a grant" can be translated directly into working code.
However, a major hurdle remains: automated tools do not prioritize human readability. They often produce convoluted implementations that satisfy the logic but behave in counterintuitive ways. When a user provides a buggy specification or forgets a constraint, debugging the resulting "black box" becomes nearly impossible. This paper addresses this transparency gap by introducing Explainable Reactive Synthesis, a process that builds implementations incrementally and justifies every architectural change using human-readable counterexample traces.
The Explainable Synthesis Workflow
The authors propose replacing traditional "one-shot" synthesis with an incremental, explanatory process. This workflow relies on three core pillars:
- Incremental Construction: Instead of synthesizing the entire system at once, the algorithm begins with a simple subset of properties.
- Minimal Repair: When a new property is introduced, the algorithm identifies the smallest possible set of changes—such as modifying a state label or redirecting a transition—to ensure the existing system satisfies the new rule.
- SAT-based Bounded Synthesis: By extending standard Bounded Synthesis with a cost constraint ($\phi_{cost}$), the tool ensures that repairs are as simple as possible, facilitating clearer explanations.
As shown in the figure above, the process visualizes the evolution of an arbiter implementation. Each step ($\Delta_1$ through $\Delta_5$) represents a discrete repair operation. To explain why a change was made, the tool uses Bounded Model Checking (BMC) to generate a "counterexample trace." This trace is a specific sequence of inputs and outputs demonstrating how the previous version of the system would have failed the new requirement.
Evaluation and Key Insights
The researchers evaluated their approach using benchmarks from the SYNTCOMP (Reactive Synthesis Competition) library, including complex industrial architectures like the AMBA Bus and network protocols like TCP-Handshake.
Key Findings:
- Repair as Explanation: Focusing on the delta between versions makes the system's evolution manageable. Understanding why a single transition was redirected is far easier than parsing a 100-state machine from scratch.
- Minimalism for Clarity: Minimal repairs ensure that justifications are not cluttered with irrelevant changes, making the logic behind each update sharper.
- Feasibility vs. Performance: The tool successfully solved nearly all benchmarks handled by state-of-the-art traditional synthesis tools (like BoSy). While the incremental SAT checks make it 10x to 50x slower, it remains practical, with execution times ranging from seconds to minutes.
Conclusion and Future Work
Explainable Reactive Synthesis provides a path toward trustworthy automated coding. By linking every architectural change to a specific violation of the specification, it provides a "justifiable" synthesis process.
Future research will focus on scaling the approach for repairs requiring many simultaneous changes, which currently face exponential search space growth. Additionally, the authors aim to develop richer visual interfaces to translate logical traces into intuitive diagrams, further bridging the gap between formal logic and practical engineering.
Summary updated