skip to main content
10.1145/3319619.3322004acmconferencesArticle/Chapter ViewAbstractPublication PagesgeccoConference Proceedingsconference-collections
research-article

Genetic algorithms as shrinkers in property-based testing

Published:13 July 2019Publication History

ABSTRACT

This paper proposes the use of genetic algorithms as shrinkers for shrinking the counterexamples generated by QuickChick, a property-based testing framework for Coq. The present study incorporates the flexibility and versatility of evolutionary algorithms into the realm of rigorous software development, in particular, making the results of property-based testing observable and comprehensible for human. The program code for merge sort is investigated as a showcase in the study. Due to the lack of similar proposals in the literature, random sample is used to compete with the proposal for comparison. The experimental results indicate that the proposed genetic algorithm outperforms random sample. Moreover, the minimal counterexamples, through which programmers are able to pinpoint the program mistakes with ease, can be successfully obtained by using genetic algorithms as shrinkers.

References

  1. Bernhard K. Aichernig and Richard Schumi. 2016. Property-Based Testing with FsCheck by Deriving Properties from Business Rule Models. In 2016 IEEE Ninth International Conference on Software Testing, Verification and Validation Workshops (ICSTW). 219--228.Google ScholarGoogle Scholar
  2. Clara Benac Earle, Lars-Åke Fredlund, and John Hughes. 2016. Automatic Grading of Programming Exercises Using Property-Based Testing. In Proceedings of the 2016 ACM Conference on Innovation and Technology in Computer Science Education (ITiCSE '16). ACM, New York, NY, USA, 47--52. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Koen Claessen and John Hughes. 2000. QuickCheck: A Lightweight Tool for Random Testing of Haskell Programs. In Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming (ICFP '00). ACM, New York, NY, USA, 268--279. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Maxime Dénès, Catalin Hritcu, Leonidas Lampropoulos, Zoe Paraskevopoulou, and Benjamin C Pierce. 2014. QuickChick: Property-based testing for Coq. In The Coq Workshop.Google ScholarGoogle Scholar
  5. The Coq development team. 2004. The Coq proof assistant reference manual. LogiCal Project, http://coq.inria.fr Version 8.0.Google ScholarGoogle Scholar
  6. Georges Gonthier. 2008. Formal proof---the four-color theorem. Notices of the AMS 55, 11 (2008), 1382--1393.Google ScholarGoogle Scholar
  7. Ronghui Gu, Zhong Shao, Hao Chen, Xiongnan Wu, Jieung Kim, Vilhelm Sjöberg, and David Costanzo. 2016. CertiKOS: An Extensible Architecture for Building Certified Concurrent OS Kernels. In Proceedings of the 12th USENLX Conference on Operating Systems Design and Implementation (OSDI'16). USENLX Association, Berkeley, CA, USA, 653--669. htfp://dl.acm.org/citation.cfm?id=3026877.3026928 Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Xavier Leroy. 2006. Formal certification of a compiler back-end, or: programming a compiler with a proof assistant. In 33rd ACM symposium on Principles of Programming Languages. ACM Press, 42--54. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Genetic algorithms as shrinkers in property-based testing

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        GECCO '19: Proceedings of the Genetic and Evolutionary Computation Conference Companion
        July 2019
        2161 pages
        ISBN:9781450367486
        DOI:10.1145/3319619

        Copyright © 2019 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 13 July 2019

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate1,669of4,410submissions,38%

        Upcoming Conference

        GECCO '24
        Genetic and Evolutionary Computation Conference
        July 14 - 18, 2024
        Melbourne , VIC , Australia

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader