skip to main content
10.1145/1291151.1291156acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Program-ing finger trees in Coq

Published:01 October 2007Publication History

ABSTRACT

Finger Trees (Hinze & Paterson, 2006) are a general purpose persistent data structure with good performance. Their genericity permits developing a wealth of structures like ordered sequences or interval trees on top of a single implementation. However, the type systems used by current functional languages do not guarantee the coherent parameterization and specialization of Finger Trees, let alone the correctness of their implementation. We present a certified implementation of Finger Trees solving these problems using the Program extension of Coq. We not only implement the structure but also prove its invariants along the way, which permit building certified structures on top of Finger Trees in an elegant way.

References

  1. Edwin Brady, Conor McBride, and James McKinna. Inductive families need not store their indices. In Stefano Berardi, Mario Coppo, and Ferruccio Damiani, editors, TYPES, volume 3085 of LNCS, pages 115--129. Springer, 2003.Google ScholarGoogle Scholar
  2. Adam Chlipala. Position paper: Thoughts on programming with proof assistants. In PLPV'06: Proceedings of the Programming Languages meets Program Verification Workshop, August 2006.Google ScholarGoogle Scholar
  3. Coq. The Coq proof assistant. coq.inria.fr.Google ScholarGoogle Scholar
  4. Thierry Coquand. Alfa/agda. In Freek Wiedijk, editor, The Seventeen Provers of the World, volume 3600 of LNCS, pages 50--54. Springer, 2006. Google ScholarGoogle Scholar
  5. Jean-Christophe Filliâtre and Pierre Letouzey. Functors for proofs and programs. In David A. Schmidt, editor, ESOP, volume 2986 of LNCS, pages 370--384. Springer, 2004.Google ScholarGoogle Scholar
  6. Seth Fogarty, Emir Pasalic, Jeremy Siek, and Walid Taha. Concoqtion: indexed types now! In G. Ramalingam and Eelco Visser, editors, PEPM, pages 112--121. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Haskell. The Haskell programming language. haskell.org.Google ScholarGoogle Scholar
  8. Ralf Hinze and Ross Paterson. Finger Trees: A Simple General-purpose Data Structure. J. Funct. Program., 16(2):197--217, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Pierre Letouzey. A new extraction for coq. In Herman Geuvers and Freek Wiedijk, editors, TYPES'02, volume 2646 of LNCS, pages 200--219. Springer, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Conor McBride. Dependently Typed Functional Programs and Their Proofs. PhD thesis, University of Edinburgh, 1999.Google ScholarGoogle Scholar
  11. Conor McBride and James McKinna. The view from the left. J. Funct. Program., 14(1):69--111, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Alexandre Miquel. The implicit calculus of constructions. In TLCA, volume 2044 of LNCS, pages 344--359. Springer, 2001. Google ScholarGoogle Scholar
  13. OCaml. The Ocaml programming language. caml.inria.fr.Google ScholarGoogle Scholar
  14. Sam Owre and Natarajan Shankar. The formal semantics of PVS. Technical Report SRI-CSL-97-2, Computer Science Laboratory, SRI International, Menlo Park, CA, August 1997.Google ScholarGoogle Scholar
  15. Catherine Parent. Synthesizing proofs from programs in the Calculus of Inductive Constructions. In Bernhard Möller, editor, MPC, volume 947 of LNCS, pages 351--379. Springer, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Christine Paulin-Mohring. Inductive definitions in the system COQ. In Typed Lambda Calculi and Applications, volume 664 of LNCS, pages 328--345. Springer, 1993. Google ScholarGoogle Scholar
  17. Tim Sheard. Languages of the future. SIGPLAN Notices, 39(12): 119--132, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Matthieu Sozeau. Subset coercions in Coq. In TYPES'06, volume 4502 of LNCS, pages 237--252. Springer, 2007. Google ScholarGoogle Scholar
  19. Benjamin Werner. On the strength of proof-irrelevant type theories. 3rd International Joint Conference on Automated Reasoning, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Hongwei Xi. Applied Type System (extended abstract). In post-workshop Proceedings of TYPES 2003, pages 394--408. Springer-Verlag LNCS 3085, 2004.Google ScholarGoogle Scholar
  21. Hongwei Xi and Frank Pfenning. Dependent types in practical programming. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), San Antonio, Texas, pages 214--227, January 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Program-ing finger trees in Coq

              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
                ICFP '07: Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
                October 2007
                346 pages
                ISBN:9781595938152
                DOI:10.1145/1291151
                • cover image ACM SIGPLAN Notices
                  ACM SIGPLAN Notices  Volume 42, Issue 9
                  Proceedings of the ICFP '07 conference
                  September 2007
                  331 pages
                  ISSN:0362-1340
                  EISSN:1558-1160
                  DOI:10.1145/1291220
                  Issue’s Table of Contents

                Copyright © 2007 ACM

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 1 October 2007

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • Article

                Acceptance Rates

                Overall Acceptance Rate333of1,064submissions,31%

                Upcoming Conference

                ICFP '23

              PDF Format

              View or Download as a PDF file.

              PDF

              eReader

              View online with eReader.

              eReader
              About Cookies On This Site

              We use cookies to ensure that we give you the best experience on our website.

              Learn more

              Got it!