SpecPylot: Python Specification Generation using Large Language Models
Not on the map. Why?
Abstract (arXiv)
Automatically generating formal specifications could reduce the effort needed to improve program correctness, but in practice, this is still challenging. Many developers avoid writing contracts by hand, which limits the use of automated verification tools. Recent large language models (LLMs) can generate specifications from code, but these specifications often fail in terms of verification. The reason is syntax errors, overly strict constraints, or mismatches with program behavior. We present SpecPylot, a Python tool that synthesizes executable specifications for Python programs as icontract annotations and checks them using crosshair's symbolic execution. The tool relies on LLMs to propose candidate contracts and uses crosshair to validate them. When crosshair finds a concrete counterexample, SpecPylot updates only the generated contracts and leaves the program itself untouched. In addition, the tool can produce coverage-driven pytest stubs and keep detailed execution artifacts that are useful during debugging. Overall, the evaluation indicates that SpecPylot is able to generate crosshair-compatible contracts for most programs, but it also highlights the practical limits introduced by bounded symbolic exploration and differences in LLM behavior.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 6 of its 21 references that are in the map. First posted on arXiv 17 Apr 2026.
Builds on
6 of 21 references.
References · 6
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 399
- 2022Few-shot training LLMs for project-specific code-summarizationcited by 129
- 2023Ranking LLM-Generated Loop Invariants for Program Verificationcited by 33
- 2025Can LLMs Reason About Program Semantics? A Comprehensive Evaluation of LLMs on Formal Specification Inferencecited by 16
- 2021EvoSpex: An Evolutionary Algorithm for Learning Postconditionscited by 6
- 2026Automatic Generation of Formal Specification and Verification Annotations Using LLMs and Test Oraclescited by 3
Built on by
Not cited yet.