kirancodes.me
To Proof Maintenance & Beyond!

Mutation Analysis for Coq

Ahmet Çelik, Karl Palmskog, Marinela Parovic, Emilio Jesús Gallego Arias, Milos Gligoric

Abstract

Mutation analysis, which introduces artificial defects into software systems, is the basis of mutation testing, a technique widely applied to evaluate and enhance the quality of test suites. However, despite the deep analogy between tests and formal proofs, mutation analysis has seldom been considered in the context of deductive verification. We propose mutation proving, a technique for analyzing verification projects that use proof assistants. We implemented our technique for the Coq proof assistant in a tool dubbed mCoq. mCoq applies a set of mutation operators to Coq definitions of functions and datatypes, inspired by operators previously proposed for functional programming languages. mCoq then checks proofs of lemmas affected by operator application. To make our technique feasible in practice, we implemented several optimizations in mCoq such as parallel proof checking. We applied mCoq to several medium and large scale Coq projects, and recorded whether proofs passed or failed when applying different mutation operators. We then qualitatively analyzed the mutants, finding many instances of incomplete specifications. For our evaluation, we made several improvements to serialization of Coq files and even discovered a notable bug in Coq itself, all acknowledged by developers. We believe mCoq can be useful both to proof engineers for improving the quality of their verification projects and to researchers for evaluating proof engineering techniques.

BibTeX
@inproceedings{Celik-al:ASE19,
  author    = {Ahmet {\c{C}}elik and
               Karl Palmskog and
               Marinela Parovic and
               Emilio Jes{\'{u}}s Gallego Arias and
               Milos Gligoric},
  title     = {Mutation Analysis for Coq},
  booktitle = {ASE},
  pages     = {539--551},
  publisher = {{IEEE}},
  year      = {2019},
}

Related papers