SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2604.12268 · 2026

CODESPECBENCH: Benchmarking LLMs for Executable Behavioral Specification Generation

Jingdong Wang, Zhijiang Guo, Xiao-Ming Wu, Xin Xu, Jianbo Dai, Huiming Wang, Zaoyu Chen, Boyu Zhu, Haoyang Yuan

arXiv · PDF · Open in the Atlas

Code that ran

4 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 1 has no contract verdict; 3 failures of our instrument; 6 no recorded run), measured 2026-11-23; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2604.12268.json · badge: /api/ran/2604.12268.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
SparksofAGI/CodeSpecBench community
Papers with Code archive
4 ran · 6 no recorded run
FunctionStatusWhere it lives
chdir Ran
ran; our contract draft was wrong, not the code
SparksofAGI/CodeSpecBench/CodeSpecBench-Func/spec-verifier/evaluation.py
pointer only (licence: NONE) · get_code("915e14b3dec02919")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SparksofAGI/CodeSpecBench when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

create_tempdir Ran
ran on a synthesized input
SparksofAGI/CodeSpecBench/CodeSpecBench-Func/spec-verifier/evaluation.py
pointer only (licence: NONE) · get_code("5d9e50968009ebec")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SparksofAGI/CodeSpecBench when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_problems Ran
ran; our contract draft was wrong, not the code
SparksofAGI/CodeSpecBench/CodeSpecBench-Func/spec-verifier/evaluation.py
pointer only (licence: NONE) · get_code("1e2d6367f1b86235")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SparksofAGI/CodeSpecBench when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

stream_jsonl Ran
ran; our contract draft was wrong, not the code
SparksofAGI/CodeSpecBench/CodeSpecBench-Func/spec-verifier/evaluation.py
pointer only (licence: NONE) · get_code("b50a1e89700bd164")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SparksofAGI/CodeSpecBench when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

check_correctness Not yet run
unverified (harvested, no recorded run)
SparksofAGI/CodeSpecBench/CodeSpecBench-Func/spec-verifier/evaluation.py
pointer only (licence: NONE) · get_code("8f623a2fab794092")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SparksofAGI/CodeSpecBench when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

evaluate_functional_correctness Not yet run
unverified (harvested, no recorded run)
SparksofAGI/CodeSpecBench/CodeSpecBench-Func/spec-verifier/evaluation.py
pointer only (licence: NONE) · get_code("f4a71b4883f98af4")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SparksofAGI/CodeSpecBench when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

openai_completion_process Not yet run
unverified (harvested, no recorded run)
SparksofAGI/CodeSpecBench/CodeSpecBench-Func/spec-verifier/evaluation.py
pointer only (licence: NONE) · get_code("1fac7c67eb0f9f0c")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SparksofAGI/CodeSpecBench when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

reliability_guard Not yet run
unverified (harvested, no recorded run)
SparksofAGI/CodeSpecBench/CodeSpecBench-Func/spec-verifier/evaluation.py
pointer only (licence: NONE) · get_code("c5042f4e7dbe8e89")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SparksofAGI/CodeSpecBench when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

unsafe_execute Not yet run
unverified (harvested, no recorded run)
SparksofAGI/CodeSpecBench/CodeSpecBench-Func/spec-verifier/evaluation.py
pointer only (licence: NONE) · get_code("6abe910b03ba0fcc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SparksofAGI/CodeSpecBench when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

write_jsonl Not yet run
unverified (harvested, no recorded run)
SparksofAGI/CodeSpecBench/CodeSpecBench-Func/spec-verifier/evaluation.py
pointer only (licence: NONE) · get_code("2b896fdffd2d763a")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, SparksofAGI/CodeSpecBench when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 3 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 0 later) and 7 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
chdir
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2107.03374 (2021-07)
Evaluating Large Language Models Trained on Code
create_tempdir
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2107.03374 (2021-07)
Evaluating Large Language Models Trained on Code
reliability_guard
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2107.03374 (2021-07)
Evaluating Large Language Models Trained on Code

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-23.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Large language models (LLMs) can generate code from natural language, but the extent to which they capture intended program behavior remains unclear. Executable behavioral specifications, defined via preconditions and postconditions, provide a concrete means to assess such understanding. However, existing work on specification generation is constrained in evaluation methodology, task settings, and specification expressiveness. We introduce CODESPECBENCH, a benchmark for executable behavioral specification generation under an execution-based evaluation protocol. CODESPECBENCH supports both function-level and repository-level tasks and encodes specifications as executable Python functions. Constructed from diverse real-world codebases, it enables a realistic assessment of both correctness (accepting valid behaviors) and completeness (rejecting invalid behaviors). Evaluating 15 state-of-the-art LLMs on CODESPECBENCH, we observe a sharp performance degradation on repository-level tasks, where the best model attains only a 20.2% pass rate. We further find that specification generation is substantially more challenging than code generation, indicating that strong coding performance does not necessarily reflect deep understanding of intended program semantics. Our data and code are available at https://github.com/SparksofAGI/CodeSpecBench.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2604.12268")
get_code_for_paper("2604.12268")
have("2604.12268")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2604.12268.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2604.12268.svg)](https://syntology.ai/paper/2604.12268)

Connect an agent — have() is free.