Download PDFOpen PDF in browser

Certification of Tail Recursive Bubble--Sort in Theorema and Coq

16 pagesPublished: May 26, 2024


Algorithm certification or program verification have an increasing importance in the current technological landscape, due to the sharp increase in the complexity of software and software using systems and the high potential of adverse effects in case of failure. For instance robots constitute a particular class of systems that can present high risks of such failures. Sorting on the other hand has a growing area of applications, in particular the ones where organizing huge data collections is critical, as for instance in environmental applications.
We present an experiment in formal certification of an original version of the Bubble- Sort algorithm that is functional and tail recursive. The certification is performed in parallel both in Theorema and in Coq, this allows to compare the characteristics and the performance of the two systems. In Theorema the proofs are produced automatically in natural style (similar to human proofs), while in Coq they are based on scripts. However, the background theory, the algorithms, and the proof rules in Theorema are composed by the user without any restrictions – thus error prone, while in Coq one can only use the theories and the proof rules that are rigurously checked by the system, and the algorithms are checked for termination.
The goal of our experiments is to contribute to a better understanding and estimation of the complexity of such certification tasks and to create a basis for further increase of the level of automation in the two systems and for their possible integration.

Keyphrases: Bubble Sort, certification, Coq, sorting, Theorema

In: Nikolaj Bjorner, Marijn Heule and Andrei Voronkov (editors). LPAR 2024 Complementary Volume, vol 18, pages 53--68

BibTeX entry
  author    = {Isabela Dramnesc and Tudor Jebelean and Sorin Stratulat},
  title     = {Certification of Tail Recursive Bubble--Sort in Theorema and Coq},
  booktitle = {LPAR 2024 Complementary Volume},
  editor    = {Nikolaj Bj\{\textbackslash{}o\}rner and Marijn Heule and Andrei Voronkov},
  series    = {Kalpa Publications in Computing},
  volume    = {18},
  pages     = {53--68},
  year      = {2024},
  publisher = {EasyChair},
  bibsource = {EasyChair,},
  issn      = {2515-1762},
  url       = {},
  doi       = {10.29007/spjs}}
Download PDFOpen PDF in browser