MEGA Hub

Specula: Scaling formal specifications for autonomous model checking of system code

Authors

Do you know Qian Cheng?You can claim authorship or link another user.Do you know Saad Mohammad Rafid Pial?You can claim authorship or link another user.Do you know Ruize Tang?You can claim authorship or link another user.Do you know Yiming Su?You can claim authorship or link another user.Do you know Emilie Ma?You can claim authorship or link another user.Do you know Finn Hackett?You can claim authorship or link another user.Do you know Ivan Beschastnikh?You can claim authorship or link another user.Do you know Yu Huang?You can claim authorship or link another user.Do you know Tianyin Xu?You can claim authorship or link another user.

Abstract

Specula is a push-button agentic system that generates high-quality formal specifications for large, complex system code and uses the specifications for highly effective model checking and bug finding. Specula employs large language model (LLM) based coding agents to autonomously develop TLA+ specifications, including invariants that describe correctness properties of the target system and formal models that describe the system implementation with the right level of abstractions. Specula is fully autonomous and thus eliminates the barrier of applying formal methods to real-world system code (as in traditional human-centric approaches). Meanwhile, Specula addresses limitations of LLM-driven techniques like reward hacking and hallucinations through self-evolving loops that iteratively improve specification quality by enabling the agents to deepen their understanding of system code and its behaviors. We have used Specula to check 48 open-source system projects; Specula found 249 bugs including many deep bugs that are hard to find by existing approaches. Specula has been used by several companies and is maintained at https://github.com/specula-org/Specula.

Community

00

Publication notes

Author note
17 pages, 11 figures