Abstract
Reactive synthesis aims to automatically generate system implementations from high-level specifications. However, many specifications are "unrealizable" because they allow for an unconstrained, adversarial environment. This paper introduces a framework for synthesizing systems that are correct under bounded environment behaviors, represented as input lassos. We present two primary methods: Lasso-Precise Synthesis, which ensures correctness for all environment behaviors up to a certain complexity, and Approximate Synthesis, which uses Maximum Model Counting to find implementations that satisfy the specification for a majority of possible environment behaviors.
Introduction
The promise of reactive synthesis is the automatic transformation of a formal "what" (a specification) into a low-level "how" (a circuit or program). A major hurdle in this field is the problem of unrealizability. Often, a specification is deemed unrealizable not because the system is poorly designed, but because the environment assumptions are too loose, allowing for unrealistic adversarial behaviors that the system cannot possibly counter.
Traditional methods for addressing unrealizability involve manually refining environment assumptions, which is often a tedious and error-prone process. This work proposes a more intuitive alternative: bounding the complexity of the environment's input sequences to recover realizability or provide robust approximate solutions.
Problem Statement
A specification is unrealizable if an environment can always force a violation. This typically happens when the environment is allowed infinite, complex behaviors. To address this, we restrict the environment to "lassos"—sequences that eventually repeat—within a specific length bound $k$. By focusing on these bounded-length input sequences, we can define a more tractable synthesis problem where the system only needs to succeed against a finite, albeit large, set of environment behaviors.
Methodology
1. Lasso-Precise Synthesis
In this approach, the environment is restricted to producing lassos where the total length of the prefix and the repeating cycle is at most $k$. We explore two techniques for solving this:
- Automata-Theoretic Approach: We construct a deterministic finite automaton (DFA) that recognizes all valid prefixes of these bounded lassos. While we prove that this automaton is necessarily exponential in size relative to $k$, it allows the synthesis problem to be solved in time polynomial to the specification size.
- Symbolic Approach (QBF): We encode the search for a system implementation of a fixed size $n$ into a Quantified Boolean Formula (QBF). This allows us to leverage modern QBF solvers to find transition systems that satisfy the specification for all lassos of length $k$.
2. Approximate Synthesis
If a specification remains unrealizable even with a bound $k$, we relax the requirement to find an implementation that is "mostly correct." We seek a design that satisfies the specification for at least a $(1-\epsilon)$ fraction of all possible input lassos. This is formulated as a Maximum Model Counting (MaxCount) problem. The goal is to find a system design (the "Max" part) that maximizes the number of satisfying input sequences (the "Count" part).
Key Results and Insights
Experiments conducted on classic benchmarks, such as Greedy and Round-Robin Arbiters, yielded several key insights:
- Realizability Recovery: Specifications that are "Unrealizable" in an infinite environment often become "Realizable" once the lasso bound $k$ is applied. For a Greedy Arbiter with one client, a bound of $k=2$ was sufficient to recover realizability.
- Quantitative Approximation: In cases that remained unrealizable, the MaxCount approach successfully found implementations with high satisfaction rates. For a Round-Robin arbiter, the tool identified a solution satisfying the specification for 88% of all possible input lassos.
- Computational Complexity: While the state space grows quickly with $k$, the symbolic QBF approach proved feasible for moderately sized problems, handling specifications with tens of thousands of gates within minutes.
Conclusion and Future Work
By shifting the focus from absolute correctness in infinite environments to guaranteed correctness in bounded ones, this research provides a pragmatic path for reactive synthesis. The move toward approximate synthesis allows for the automated generation of useful systems even when a perfect implementation is theoretically impossible. Future work will focus on improving the scalability of these methods, particularly by optimizing the translation of LTL formulas into constraints and leveraging advancements in underlying QBF and MaxCount solvers.
Summary updated