Lune

FSE2020Top-tier venue

Evolutionary improvement of assertion oracles

Valerio Terragni, Gunel Jahangirova, Paolo Tonella, Mauro Pezzè

2020Year
50Citations
14Top-tier citations

Abstract

Assertion oracles are executable boolean expression placed inside the program. A perfect assertion oracle should pass (return true) for all correct executions and fail (return false) for all incorrect executions. The difficulty of manually design or automatically generate perfect oracles often leads to assertions that fail to distinguish between correct and incorrect executions. In other words, they have false positives and false negatives that we call oracle deficiencies. In this paper, we propose GASSERT (Genetic ASSERTion improvement), the first technique to automatically improve assertions oracles. Given an assertion oracle and its oracle deficiencies, GASSERT uses a novel evolutionary algorithm that explores the space of possible assertions to identify a new assertion with fewer oracle deficiencies than the original assertion. Our empirical evaluation on 34 JAVA methods from 7 JAVA code bases shows that GASSERT effectively improves assertion oracles. Moreover, GASSERT outperforms two baselines (unguided-random and invariantbased oracle improvement) and was competitive with and in some cases even outperformed human improved assertions.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

Cited by top-tier papers14

Ask how each one uses it

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines