skip to main content
10.1145/2505879.2505890acmotherconferencesArticle/Chapter ViewAbstractPublication PagesppdpConference Proceedingsconference-collections
research-article

An operational foundation for the tactic language of Coq

Published:16 September 2013Publication History

ABSTRACT

We introduce a semantic toolbox for Ltac, the tactic language of the popular Coq proof assistant. We present three formats of operational semantics, each of which has its use in the practice of tactic programming: a big-step specification in the form of natural semantics, a model of implementation in the form of an abstract machine, and a small-step characterization of computation in the form of reduction semantics. The three semantics are provably equivalent and have been obtained via off-the-shelf derivation techniques of the functional correspondence and the syntactic correspondence. We also give examples of Ltac programs and discuss some of the issues that the formal semantics help to clarify.

With this work we hope to enhance the operational understanding of Ltac as well as to set up a framework to reason about Coq scripts and to build tools supporting tactic programming based on rigorous semantics.

References

  1. M. S. Ager, D. Biernacki, O. Danvy, and J. Midtgaard. A functional correspondence between evaluators and abstract machines. In PPDP 2003, pp. 8--19, Uppsala, Sweden, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. D. Aspinall, E. Denney, and C. Lüth. Tactics for hierarchical proof. Mathematics in Computer Science, 3(3):309--330, 2010.Google ScholarGoogle ScholarCross RefCross Ref
  3. Y. Bertot and P. Castéran. Interactive Theorem Proving and Program Development: Coq'Art: The Calculus of Inductive Constructions. Springer, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. M. Biernacka, D. Biernacki, and O. Danvy. An operational foundation for delimited continuations in the CPS hierarchy. Logical Methods in Computer Science, 1(2:5):1--39, 2005.Google ScholarGoogle Scholar
  5. M. Biernacka and O. Danvy. A concrete framework for environment machines. ACM Transactions on Computational Logic, 9(1):1--30, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. T. Bourke, M. Daum, G. Klein, and R. Kolanski. Challenges and experiences in managing large-scale proofs. In ICICM, pp. 32--48, Bremen, Germany, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. A. Chlipala. Certified programming with dependent types. http://adam.chlipala.net/cpdt/.Google ScholarGoogle Scholar
  8. C. Sacerdoti Coen, E. Tassi, and S. Zacchiroli. Tinycals: Step by step tacticals. ENTCS, 174(2):125--142, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. O. Danvy and L. R. Nielsen. Syntactic theories in practice. In RULE 2001, ENTCS, 59(4), Firenze, Italy, 2001.Google ScholarGoogle Scholar
  10. R. Davies and F. Pfenning. A modal analysis of staged computation. Journal of the ACM, 48(3):555--604, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. D. Delahaye. A tactic language for the system Coq. In LPAR 2000, LNCS 1955, pp. 85--95, Reunion Island, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. D. Delahaye. A Proof Dedicated Meta-Language. In LFM 2002, ENTCS, 70(2), pp. 96--109, Copenhagen, Denmark, 2002.Google ScholarGoogle Scholar
  13. E. Denney, J. Power, and K. Tourlas. Hiproofs: A hierarchical notion of proof tree. ENTCS, 155, pp. 341--359, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. G. Gonthier. The four colour theorem: Engineering of a formal proof. In ASCM 2007, LNCS 5081, pp. 333--333. Singapore, 2007.Google ScholarGoogle Scholar
  15. G. Gonthier. Engineering mathematics: the odd order theorem proof. In POPL 2013, pp. 1--2, Rome, Italy, 2013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. M. J. C. Gordon, R. Milner, and C. Wadsworth. Edinburgh LCF: A Mechanized Logic of Computation, LNCS 78, 1979.Google ScholarGoogle Scholar
  17. T. Hardin, L. Maranget, and B. Pagano. Functional runtime systems within the lambda-sigma calculus. Journal of Functional Programming, 8(2):131--172, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. F. Kirchner. Coq tacticals and PVS strategies: A small-step semantics. In Design and Application of Strategies/Tactics in Higher Order Logics, pp. 69--83, 2003.Google ScholarGoogle Scholar
  19. Oleg Kiselyov, Chung-chieh Shan, Daniel P. Friedman, and Amr Sabry. Backtracking, interleaving, and terminating monad transformers. In ICFP 2005, SIGPLAN Notices, Vol. 40, No. 9, pp. 192--203, Tallinn, Estonia, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. G. Klein, K. Elphinstone, G. Heiser, J. Andronick, D. Cock, Philip Derrin, Dhammika Elkaduwe, Kai Engelhardt, Rafal Kolanski, Michael Norrish, Thomas Sewell, Harvey Tuch, and Simon Winwood. seL4: formal verification of an OS kernel. In SIGOPS 2009, pp. 207--220. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. J.-L. Krivine. A call-by-name lambda-calculus machine. Higher-Order and Symbolic Computation, 20(3):199--207, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. P. J. Landin. The mechanical evaluation of expressions. The Computer Journal, 6(4):308--320, 1964.Google ScholarGoogle ScholarCross RefCross Ref
  23. D. K. Lee, K. Crary, and R. Harper. Towards a mechanized metatheory of Standard ML. In POPL 2007, pp. 173--184, Nice, France, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. X. Leroy. The Zinc experiment: an economical implementation of the ML language. Rapport Technique 117, INRIA Rocquencourt, Le Chesnay, France, 1990.Google ScholarGoogle Scholar
  25. X. Leroy. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In POPL 2006, pp. 42--54, Charleston, South Carolina, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. S. Marlow and S. L. Peyton Jones. Making a fast curry: push/enter vs. eval/apply for higher-order languages. Journal of Functional Programming, 16(4-5):415--449, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. A. P. Martin, H. B. Gardiner, and J. C. P. Woodcock. A tactic calculus -- abridged version. Formal Aspects of Computing, 8(4):479--489, 1996.Google ScholarGoogle ScholarCross RefCross Ref
  28. A. P. Martin and J. Gibbons. A monadic interpretation of tactics. Unpublished note, 2002.Google ScholarGoogle Scholar
  29. T. Nipkow, M. Wenzel, and L. C. Paulson. Isabelle/HOL: a proof assistant for higher-order logic. Springer-Verlag, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. The Caml Language. http://caml.inria.fr/.Google ScholarGoogle Scholar
  31. S. L. Peyton Jones. Implementing lazy functional languages on stock hardware: The spineless tagless G-machine. Journal of Functional Programming, 2(2):127--202, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  32. F. Pfenning and C. Schürmann. System description: Twelf -- a meta-logical framework for deductive systems. In CADE 1999, LNAI 1632, pp. 202--206, Trento, Italy, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. Piróg and D. Biernacki. A systematic derivation of the STG machine verified in Coq. In Jeremy Gibbons, editor, Haskell'10, pp. 25--36, Baltimore, MD, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. J. C. Reynolds. Definitional interpreters for higher-order programming languages. Higher-Order and Symbolic Computation 11(4):363--397, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. The Coq Development Team. The Coq Proof Assistant Reference Manual, Version 8.4pl2, 2013.Google ScholarGoogle Scholar
  36. I. Whiteside, D. Aspinall, L. Dixon, and G. Grov. Towards formal proof script refactoring. In ICICM 2011, pp. 260--275, Bertinoro, Italy, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An operational foundation for the tactic language of 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 Other conferences
              PPDP '13: Proceedings of the 15th Symposium on Principles and Practice of Declarative Programming
              September 2013
              308 pages
              ISBN:9781450321549
              DOI:10.1145/2505879

              Copyright © 2013 ACM

              Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 16 September 2013

              Permissions

              Request permissions about this article.

              Request Permissions

              Check for updates

              Qualifiers

              • research-article

              Acceptance Rates

              Overall Acceptance Rate230of486submissions,47%

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader