Search-based Inference of Class Invariants
Many techniques in formal verification and software testing rely on repOk routines to verify the consistency and validity of software components with complex data representations. A repOk function encodes the state properties necessary for an instance to be a valid object of the class under analysis, enabling early error detection and simplifying debugging. However, writing a correct and complete repOk can be challenging. This paper introduces Express, the first search-based algorithm designed to automatically generate a correct repOk for a given class. Express leverages simulated annealing, using the source code and test suite of the class under analysis to iteratively construct a repOk. We demonstrate how Express works on the LinkedList class of the Java standard library, and show that it produces a correct and complete repOK.
Authors
- Juan Manuel Copia (ORCID: https://orcid.org/0000-0001-7378-2603)
- Nazareno Aguirre (ORCID: https://orcid.org/0000-0003-0532-5296)
- Alessandra Gorla (ORCID: https://orcid.org/0000-0002-6711-3080)
- Facundo Molina (ORCID: https://orcid.org/0000-0002-2441-1555)
- Pablo Ponzio (ORCID: https://orcid.org/0000-0003-0112-7153)
Institutions
- Universidad Nacional de Río Cuarto (AR)
- IMDEA Software Institute (ES)
- Universidad Politécnica de Madrid (ES)
Publication Details
- Journal
- Proceedings of the Genetic and Evolutionary Computation Conference Companion
- Published
- 2025-07-14
- DOI
- https://doi.org/10.1145/3712255.3726698
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Agencia Estatal de Investigación