Shrinking Counterexamples in Property-Based Testing with Genetic Algorithms

Fang Yi Lo, Chao Hong Chen, Ying Ping Chen

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

In this paper, genetic algorithms are proposed to shrink counterexamples found by QuickChick, a property-based testing framework for Coq. In order to make the outcome of property-based testing humanly understandable and inspectable, genetic algorithms are brought into the realm of rigorous software development as shrinkers capable of handling a broad range of data structures. In the present study, two showcases, merge sort and insertion of red-black trees, are investigated for illustrative purposes. Due to the lack of relevant results existing in the literature, two baseline methods, random sample and random walk are included in the experiments for comparison with the proposed genetic algorithm. The obtained results indicate that the proposal is effective since the program mistake can be identified with ease by examining the shrunk counterexamples and also that the adopted genetic algorithm statistically significantly outperforms random sample and random walk in both counterexample sizes and running time.

Original languageEnglish
Title of host publication2020 IEEE Congress on Evolutionary Computation, CEC 2020 - Conference Proceedings
PublisherInstitute of Electrical and Electronics Engineers Inc.
ISBN (Electronic)9781728169293
DOIs
StatePublished - Jul 2020
Event2020 IEEE Congress on Evolutionary Computation, CEC 2020 - Virtual, Glasgow, United Kingdom
Duration: 19 Jul 202024 Jul 2020

Publication series

Name2020 IEEE Congress on Evolutionary Computation, CEC 2020 - Conference Proceedings

Conference

Conference2020 IEEE Congress on Evolutionary Computation, CEC 2020
CountryUnited Kingdom
CityVirtual, Glasgow
Period19/07/2024/07/20

Fingerprint Dive into the research topics of 'Shrinking Counterexamples in Property-Based Testing with Genetic Algorithms'. Together they form a unique fingerprint.

Cite this