TL;DR
IC3Syn is a novel neuro-symbolic framework that automates the discovery of inductive invariants for distributed protocols specified in TLA+. By embedding Large Language Models (LLMs) within the structured discipline of the hardware-verification algorithm IC3, it breaks down a complex global synthesis problem into manageable, localized tasks. IC3Syn successfully found safety proofs for 29 complex protocols, including industrial-scale systems that completely stumped prior automated tools.
What Problem Does This Paper Address?
Distributed protocols (like Raft or Paxos) form the backbone of modern infrastructure, but ensuring they are bug-free is notoriously difficult. To formally prove a protocol's safety, verification engineers rely on inductive invariants—mathematical statements about the system state that hold true initially and are preserved by every possible protocol transition.
Inferring these invariants is the primary bottleneck in formal verification. Existing automated tools either force developers to restrict their protocol models to simplistic, decidable fragments of logic, or they require experts to manually craft "predicate pools" (templates) to guide the search. While modern LLMs possess high-level reasoning skills, directly asking an LLM to generate a complete inductive invariant fails because the task is too global and brittle; a single minor error or overly strong clause invalidates the entire proof.
Methods
The authors introduce IC3Syn, a framework that shifts the LLM's role from a "sole creator" to a "hypothesis generator" guided by a symbolic controller.
As shown in Figure 1, the framework splits the labor across three main components:
- IC3 Controller (Symbolic): Implements the frame-based IC3 algorithm. Instead of tackling the global invariant at once, it performs a backward search to isolate concrete, "predecessor-free" bad states that violate safety.
- LLM Module (Neural): Takes the specific bad states along with the TLA+ protocol context and proposes localized "blocking clauses" to rule them out.
- Verification Backend: Uses a dual-model-checker setup. Apalache (an SMT-based symbolic model checker) handles the precise one-step reachability queries, while TLC (an explicit-state model checker) rapidly screens batches of LLM-generated clauses against concrete reachable states to filter out bad guesses.
Crucially, if the LLM fails to generate a valid clause after repeated attempts, the controller falls back to a deterministic "exact aggregate blocker." This guarantees that the system remains complete for finite instances, compensating for any LLM imprecision.
Datasets
The authors evaluated IC3Syn on a benchmark suite of 29 distributed protocols spanning consensus, leader election, lock services, transaction commit, firewalls, and client-server systems.
The suite primarily draws from the standard Endive benchmark collection and includes a highly complex Paxos variant (pyv-paxos-epr) from the IC3PO repository. Most notably, it includes a massive, production-grade case study: MongoLoglessDynamicRaft (MLDR), an industrial-scale protocol modeling the dynamic reconfiguration and consensus mechanism used in MongoDB’s replication layer.
Key Insights and Ideas
- Decomposition Tames LLM Brittleness: LLMs struggle with global synthesis but excel when given a localized sub-problem. By asking the LLM to block one specific bad state at a time, the prompt context becomes concrete and highly effective.
- Symbiosis of Logic and Learning: Pure symbolic tools lack the protocol-level intuition needed for expressive languages like TLA+, while pure neural approaches lack mathematical rigor. IC3Syn uses the symbolic framework to enforce proof discipline and the LLM to provide structural intuition.
- Architecture Compensates for Weaker Models: In ablation studies, replacing the state-of-the-art Claude Opus with a much weaker model (Gemini 3 Flash) still yielded a 93% success rate (27/29 protocols). This proves that the surrounding verification architecture, rather than raw model size, drives the framework's robustness.
Key Results
- 100% Success Rate: IC3Syn successfully discovered candidate invariants for all 29 protocols in the benchmark suite.
- Outperforming the State-of-the-Art: IC3Syn decisively beat prior tools. For comparison, Endive solved 24/28 shared protocols, IC3PO solved 26/29, and SWISS solved 17/29.
- Cracking the Hardest Cases: IC3Syn successfully solved MLDR (taking 4,525 seconds) and
pyv-paxos-epr. None of the four baseline tools (Endive, IC3PO, SWISS, DistAI) could report a solution for these two protocols, typically timing out. - Unbounded Safety Proofs: While the invariants were synthesized on finite instances, the authors used the TLA+ Proof System (TLAPS) to prove they hold for unbounded protocol instances. This proof-writing step was largely automated using LLM agents, requiring minimal human intervention.
Limitations and Future Work
- Finite-Instance Dependency: IC3Syn initially validates inductiveness on bounded, finite instances before lifting them to unbounded proofs via TLAPS. If a protocol's core bug only manifests on massive instances, the initial search might miss it.
- Agent Workflow Latency: While LLM agents successfully discharged the final TLAPS proofs, the process suffered from high latency due to repeated tool and script calls.
- Future Directions: The authors plan to scale IC3Syn to even larger real-world engineering systems with richer state spaces and tightly integrate the agent-driven TLAPS workflow into a fully automated, end-to-end pipeline.
Summary updated