🤖 AI Summary
To address the low synthesis efficiency and difficulty in detecting unrealizability in formal design of distributed protocols, this paper proposes the first counterexample-guided synthesis framework for TLA+. Methodologically, it integrates program sketching—with its support for structured search-space modeling—and explanation reduction, which pre-filters erroneous candidates and avoids redundant enumeration. Coupled with precise counterexample generalization, the approach achieves exponential compression of the search space. On standard benchmarks, it consistently outperforms state-of-the-art tools by one to two orders of magnitude; notably, it synthesizes complete TLA+ protocols from scratch within three minutes—whereas prior tools frequently time out after one hour. Key contributions include: (i) the first explanation reduction mechanism for protocol synthesis, (ii) an efficient counterexample-driven synthesis paradigm, and (iii) the first scalable, fully automated TLA+ protocol synthesis system.
📝 Abstract
We present a novel counterexample-guided, sketch-based method for the synthesis of symbolic distributed protocols in TLA+. Our method's chief novelty lies in a new search space reduction technique called interpretation reduction, which allows to not only eliminate incorrect candidate protocols before they are sent to the verifier, but also to avoid enumerating redundant candidates in the first place. Further performance improvements are achieved by an advanced technique for exact generalization of counterexamples. Experiments on a set of established benchmarks show that our tool is almost always faster than the state of the art, often by orders of magnitude, and was also able to synthesize an entire TLA+ protocol"from scratch"in less than 3 minutes where the state of the art timed out after an hour. Our method is sound, complete, and guaranteed to terminate on unrealizable synthesis instances under common assumptions which hold in all our benchmarks.