NeurIPS 2026Coming to NeurIPS in Sydney?Explore papers, orals & directions

Fun2spec: Code Contract Synthesis At Scale

Shubham Ugare, Tarun Suresh, Sasa Misailovic, Julien VanegueOpenReview 2026 · Submission to ICLR 2026 · Withdrawn

Its authors withdrew this paper, so there is no full text to read or summarize.

Abstract

Specification synthesis -- the problem of inferring program specification from program implementation -- is an undecidable problem. Therefore, machine learning and more specifically, autoregressive large language models (LLMs) are a good fit for solving this problem. We demonstrate that code contracts, the most widespread software specification mechanism, can be generated by LLMs and validated using a software testing oracle on large real-world codebases. This oracle acts as an approximate code contract verifier. It only selects LLM-generated contracts that are test-valid, guaranteeing that the obtained contracts are at least as good as the test suite provided by the program. Our tool Fun2spec is the first code contract synthesis tool applied to real-world large-scale low-level C and C++ programs of millions of lines of code, raising the state-of-the-art of automated software verification using LLMs.
BibTeX
@misc{ugare2026fun,
  author = {Shubham Ugare and Tarun Suresh and Sasa Misailovic and Julien Vanegue},
  title = {{Fun2spec: Code Contract Synthesis At Scale}},
  year = {2026},
  url = {https://openreview.net/forum?id=Z7TUUQPSzY},
  howpublished = {OpenReview},
  note = {Submitted to ICLR 2026},
}

Loading related content...

Figure