EvoSpex: An Evolutionary Algorithm for Learning Postconditions
Not on the map. Why?
Abstract (arXiv)
Software reliability is a primary concern in the construction of software, and thus a fundamental component in the definition of software quality. Analyzing software reliability requires a specification of the intended behavior of the software under analysis, and at the source code level, such specifications typically take the form of assertions. Unfortunately, software many times lacks such specifications, or only provides them for scenario-specific behaviors, as assertions accompanying tests. This issue seriously diminishes the analyzability of software with respect to its reliability. In this paper, we tackle this problem by proposing a technique that, given a Java method, automatically produces a specification of the method's current behavior, in the form of postcondition assertions. This mechanism is based on generating executions of the method under analysis to obtain valid pre/post state pairs, mutating these pairs to obtain (allegedly) invalid ones, and then using a genetic algorithm to produce an assertion that is satisfied by the valid pre/post pairs, while leaving out the invalid ones. The technique, which targets in particular methods of reference-based class implementations, is assessed on a benchmark of open source Java projects, showing that our genetic algorithm is able to generate post-conditions that are stronger and more accurate, than those generated by related automated approaches, as evaluated by an automated oracle assessment tool. Moreover, our technique is also able to infer an important part of manually written rich postconditions in verified classes, and reproduce contracts for methods whose class implementations were automatically synthesized from specifications.
Key facts. Cited by 6 papers in the map (data through 14 Oct 2026). First posted on arXiv 26 Feb 2021.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2023: 1; 2024: 1; 2025: 0; 2026: 4.
6 papers.
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?cited by 57
- 2024The Future of AI-Driven Software Engineeringcited by 23
- 2026AutoReSpec: A Framework for Generating Specification using Large Language Modelscited by 3
- 2026Teaching Code LLMs to Reason with Intermediate Formal Specificationscited by 1
- 2026SpecPylot: Python Specification Generation using Large Language Modelscited by 0
- 2026Agentic Generation and Evolution of Knowledge Modelscited by 0
- 2026Teaching Code LLMs to Reason with Intermediate Formal Specifications5 Jul 2026
- 2026Agentic Generation and Evolution of Knowledge Models2 Jun 2026
- 2026SpecPylot: Python Specification Generation using Large Language Models17 Apr 2026
- 2026AutoReSpec: A Framework for Generating Specification using Large Language Models4 Apr 2026
- 2024The Future of AI-Driven Software Engineering11 Jun 2024
- 2023Can Large Language Models Transform Natural Language Intent into Formal Method Postconditions?3 Oct 2023