Abstract
This article deals with a method to build programs in computational geometry from their specifications. It focuses on a case study namely computing incrementally the convex hull of a set of points in the plane using hypermaps. Our program to compute convex hulls is specified and proved correct using the Coq proof assistant. It performs a recursive traversal of the existing convex hull to compute the new hull each time a new point is inserted. This requires using well-founded recursion in Coq. A concrete implementation in Ocaml is then automatically extracted and an efficient C++ program is derived (by hand) from the specification.
This work was supported by the french ANR project Galapagos (2008-2011).
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Alkassar, E., Böhme, S., Mehlhorn, K., Rizkallah, C.: Verification of Certifying Computations. In: Gopalakrishnan, G., Qadeer, S. (eds.) CAV 2011. LNCS, vol. 6806, pp. 67–82. Springer, Heidelberg (2011)
Bertot, Y., Castéran, P.: Interactive Theorem Proving and Program Development, Coq’Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science, An EATCS Series. Springer (2004)
Bertot, Y., Magaud, N., Zimmermann, P.: A Proof of GMP Square Root. Journal of Automated Reasoning 29(3-4), 225–252 (2002)
Bertrand, Y., Dufourd, J.-F., Françon, J., Lienhardt, P.: Algebraic Specification and Development in Geometric Modeling. In: Gaudel, M.-C., Jouannaud, J.-P. (eds.) CAAP 1993, FASE 1993, and TAPSOFT 1993. LNCS, vol. 668, pp. 75–89. Springer, Heidelberg (1993)
Brun, C., Dufourd, J.-F., Magaud, N.: Formal Proof of the Incremental Convex Hull Algorithm, http://galapagos.gforge.inria.fr
Brun, C., Dufourd, J.-F., Magaud, N.: Designing and Proving Correct a Convex Hull Algorithm with Hypermaps in Coq. Computational Geometry, Theory and Applications 45(8), 436–457 (2012)
CEA-INRIA. The Frama-C Software Verification Toolkit, http://frama-c.cea.fr
Coq Development Team. The Coq Proof Assistant - Reference Manual and Library, http://coq.inria.fr/
Cori, R.: Un code pour les graphes planaires et ses applications. Astérisque, vol. 27. Socieété mathématique de France (1970)
de Berg, M., Cheong, O., van Kreveld, M., Overmars, M.: Computational Geometry, Algorithms and Applications. Springer (2008)
Dufourd, J.-F.: Design and Formal Proof of a New Optimal Image Segmentation Program with Hypermaps. Pattern Recognition 40(11), 2974–2993 (2007)
Dufourd, J.-F.: An Intuitionistic Proof of a Discrete Form of the Jordan Curve Theorem Formalized in Coq with Combinatorial Hypermaps. Journal of Automated Reasoning 43(1), 19–51 (2009)
Dufourd, J.-F., Bertot, Y.: Formal Study of Plane Delaunay Triangulation. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 211–226. Springer, Heidelberg (2010)
Edelsbrunner, H.: Algorithms in Combinatorial Geometry. Monographs in Theoretical Computer Science, An EATCS Series. Springer (1987)
Flato, E., Halperin, D., Hanniel, I., Nechushtan, O.: The Design and Implementation of Planar Maps in CGAL. In: Vitter, J.S., Zaroliagis, C.D. (eds.) WAE 1999. LNCS, vol. 1668, pp. 154–168. Springer, Heidelberg (1999)
Gonthier, G.: Formal Proof - The Four-Colour Theorem. Notices of the AMS 55(11), 1382–1393 (2008)
IGG Team. CGoGN: Combinatorial and Geometric mOdeling with Generic N-dimensional Maps, https://iggservis.u-strasbg.fr/CGoGN/
Kettner, L., Mehlhorn, K., Pion, S., Schirra, S., Yap, C.-K.: Classroom Examples of Robustness Problems in Geometric Computations. Computational Geometry 40(1), 61–78 (2008)
Knuth, D.E.: Axioms and Hulls. LNCS, vol. 606. Springer, Heidelberg (1992)
Lienhardt, P.: Topological Models for Boundary Representation: a Comparison with n-Dimensional Generalized Maps. Computer-Aided Design 23, 59–82 (1991)
Meikle, L.I., Fleuriot, J.D.: Mechanical Theorem Proving in Computational Geometry. In: Hong, H., Wang, D. (eds.) ADG 2004. LNCS (LNAI), vol. 3763, pp. 1–18. Springer, Heidelberg (2006)
Nipkow, T., Bauer, G., Schultz, P.: Flyspeck I: Tame graphs. In: Furbach, U., Shankar, N. (eds.) IJCAR 2006. LNCS (LNAI), vol. 4130, pp. 21–35. Springer, Heidelberg (2006)
Pichardie, D., Bertot, Y.: Formalizing Convex Hull Algorithms. In: Boulton, R.J., Jackson, P.B. (eds.) TPHOLs 2001. LNCS, vol. 2152, pp. 346–361. Springer, Heidelberg (2001)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2013 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Brun, C., Dufourd, JF., Magaud, N. (2013). Formal Proof in Coq and Derivation of an Imperative Program to Compute Convex Hulls. In: Ida, T., Fleuriot, J. (eds) Automated Deduction in Geometry. ADG 2012. Lecture Notes in Computer Science(), vol 7993. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-40672-0_6
Download citation
DOI: https://doi.org/10.1007/978-3-642-40672-0_6
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-40671-3
Online ISBN: 978-3-642-40672-0
eBook Packages: Computer ScienceComputer Science (R0)