specula-org/Specula

Specula: An agentic tool for finding deep bugs in system code using TLA+

What it solves

Specula finds deep, complex bugs in concurrent and distributed system code that are typically difficult to detect through traditional testing. It automates the process of formal verification by bridging the gap between high-level system specifications and actual code implementation.

How it works

Specula uses AI coding agents to analyze a target system's source code and automatically write TLA+ specifications. These specifications include formal models of the system's implementation and invariants that define what "correctness" looks like for that system. The tool then model-checks these specifications to find potential violations. Once a violation is found, Specula works to reproduce those violations at the actual code level to confirm the bug.

Who it’s for

Software engineers and researchers working on concurrent or distributed systems who need to ensure high levels of correctness and find deep architectural or logic bugs.

Highlights

  • Automated Formal Specs: Uses LLM-based coding agents to generate TLA+ models from source code.
  • Code-Level Reproduction: Not only finds theoretical violations in a model but reproduces them in the actual implementation.
  • CI Integration: Supports continuous verification to check source changes incrementally.
  • Agent Agnostic: Compatible with various coding agents including Claude Code, Codex, and Copilot CLI via a system of skills and MCP tools.

Related

  • Project
  • Project
  • Project
  • Project
  • Project