Skip to main content

Optimizing a Certified Proof Checker for a Large-Scale Computer-Generated Proof

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 9150))

Abstract

In recent work, we formalized the theory of optimal-size sorting networks with the goal of extracting a verified checker for the large-scale computer-generated proof that 25 comparisons are optimal when sorting 9 inputs, which required more than a decade of CPU time and produced 27 GB of proof witnesses. The checker uses an untrusted oracle based on these witnesses and is able to verify the smaller case of 8 inputs within a couple of days, but it did not scale to the full proof for 9 inputs. In this paper, we describe several non-trivial optimizations of the algorithm in the checker, obtained by appropriately changing the formalization and capitalizing on the symbiosis with an adequate implementation of the oracle. We provide experimental evidence of orders of magnitude improvements to both runtime and memory footprint for 8 inputs, and actually manage to check the full proof for 9 inputs.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Notes

  1. 1.

    The choice of Haskell as target language is pragmatic: preliminary experiments suggested that it was the fastest one for this project.

  2. 2.

    Throughout this presentation we will always show transcribed Coq code, which is almost completely computational and preserved by extraction.

References

  1. Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development. Texts in Theoretical Computer Science. Springer, Heidelberg (2004)

    Book  MATH  Google Scholar 

  2. Codish, M., Cruz-Filipe, L., Frank, M., Schneider-Kamp, P.: Twenty-five comparators is optimal when sorting nine inputs (and twenty-nine for ten). In: ICTAI 2014, pp. 186–193. IEEE (2014)

    Google Scholar 

  3. Contejean, E., Courtieu, P., Forest, J., Pons, O.: Automated certified proofs with CiME3. In: Schmidt-Schauß, M. (ed.) RTA 2011. LIPIcs, vol. 10, pp. 21–30. Schloss Dagstuhl, Germany (2011)

    Google Scholar 

  4. Cruz-Filipe, L., Letouzey, P.: A large-scale experiment in executing extracted programs. Electron. Notes Comput. Sci. 151(1), 75–91 (2006)

    Article  MATH  Google Scholar 

  5. Cruz-Filipe, L., Schneider-Kamp, P.: Formalizing size-optimal sorting networks: extracting a certified proof checker. In: Proceedings of ITP 2015, LNCS, Springer (2015, Submitted for Publication). CoRR. abs/1502.05209

  6. Floyd, R.W., Knuth, D.E.: The Bose-Nelson sorting problem. In: Srivastava, J.N. (ed.) A Survey of Combinatorial Theory, pp. 163–172. North-Holland, Amsterdam (1973)

    Chapter  Google Scholar 

  7. Fouilhe, A., Monniaux, D., Périn, M.: Efficient generation of correctness certificates for the abstract domain of polyhedra. In: Logozzo, F., Fähndrich, M. (eds.) Static Analysis. LNCS, vol. 7935, pp. 345–365. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  8. Knuth, D.E.: The Art of Computer Programming, Volume III: Sorting and Searching. Addison-Wesley, Redwood City (1973)

    MATH  Google Scholar 

  9. Krebbers, R., Spitters, B.: Computer certified efficient exact reals in Coq. In: Davenport, J.H., Farmer, W.M., Urban, J., Rabe, F. (eds.) MKM 2011 and Calculemus 2011. LNCS, vol. 6824, pp. 90–106. Springer, Heidelberg (2011)

    Google Scholar 

  10. Leroy, X.: Formal verification of a realistic compiler. Commun. ACM 52(7), 107–115 (2009)

    Article  Google Scholar 

  11. Letouzey, P.: Extraction in Coq: an overview. In: Beckmann, A., Dimitracopoulos, C., Löwe, B. (eds.) CiE 2008. LNCS, vol. 5028, pp. 359–369. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  12. O’Connor, R.: Certified exact transcendental real number computation in Coq. In: Mohamed, O.A., Muñoz, C., Tahar, S. (eds.) TPHOLs 2008. LNCS, vol. 5170, pp. 246–261. Springer, Heidelberg (2008)

    Chapter  Google Scholar 

  13. Oury, N.: Observational equivalence and program extraction in the Coq proof assistant. In: Hofmann, M.O. (ed.) TLCA 2003. LNCS, vol. 2701, pp. 271–285. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  14. Sternagel, C., Thiemann, R.: The certification problem format. In: Benzmüller, C., Paleo, B.W. (eds.) UITP 2014. EPTCS, vol. 167, pp. 61–72. ACM Press, New York (2014)

    Google Scholar 

  15. Thiemann, R.: Formalizing bounded increase. In: Blazy, S., Paulin-Mohring, C., Pichardie, D. (eds.) ITP 2013. LNCS, vol. 7998, pp. 245–260. Springer, Heidelberg (2013)

    Chapter  Google Scholar 

  16. van Voorhis, D.C.: Toward a lower bound for sorting networks. In: Miller, R.E., Thatcher, J.W. (eds.) Complexity of Computer Computations. The IBM Research Symposia Series, pp. 119–129. Plenum Press, New York (1972)

    Chapter  Google Scholar 

Download references

Acknowledgements

We would like to thank Pierre Letouzey for suggesting and helping with extracting to Haskell native types, Søren Haagerup for helping with profiling, and Michael Codish for his support and his enthusiasm about sorting networks.

The authors were supported by the Danish Council for Independent Research, Natural Sciences. Computational resources were generously provided by the Danish Center for Scientific Computing.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Luís Cruz-Filipe .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Cruz-Filipe, L., Schneider-Kamp, P. (2015). Optimizing a Certified Proof Checker for a Large-Scale Computer-Generated Proof. In: Kerber, M., Carette, J., Kaliszyk, C., Rabe, F., Sorge, V. (eds) Intelligent Computer Mathematics. CICM 2015. Lecture Notes in Computer Science(), vol 9150. Springer, Cham. https://doi.org/10.1007/978-3-319-20615-8_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-20615-8_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-20614-1

  • Online ISBN: 978-3-319-20615-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics