ACM Home Page
Please provide us with feedback. Feedback
A coinductive monad for prop-bounded recursion
Full text PdfPdf (211 KB)
Source
International Conference on Functional Programming archive
Proceedings of the 2007 workshop on Programming languages meets program verification table of contents
Freiburg, Germany
SESSION: Monads, refinement table of contents
Pages: 11 - 20  
Year of Publication: 2007
ISBN:978-1-59593-677-6
Author
Adam Megacz  UC Berkeley, Berkeley, CA
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 4,   Downloads (12 Months): 26,   Citation Count: 1
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1292597.1292601
What is a DOI?

ABSTRACT

This paper develops machinery necessary to mechanically import arbitrary functional programs into Coq's type theory, manually strengthen their specifications with additional proofs, and then mechanicaly re-extracting the newly-certified program in a form which is as efficient as the original program. In order to facilitate this goal, the coinductive technique of[Capretta2005] is modified to form a monad whose operators are the constructors of a coinductive type rather than functions defined over the type. The inductive invariant technique of [Krstic2003] is extended to allow optional "after the fact" termination proofs. These proofs inhabit members of Prop, and therefore do not affect extracted code. Compared to [Capretta2005], the new monad makes it possible to directly represent unrestricted recursion without violating productivity requirements [Gimenez1995], and it produces efficient code via Coq's extraction mechanism. The disadvantages of this technique include reliance on the JMeq axiom [McBride2000] and a significantly more complex notion of equality. The resulting technique is packaged as a Coq library, and is suitable for formalizing programs written in any side-effect-free functional language with call-by-value semantics. It can be downloaded from: http://www.cs.berkeley.edu/~megacz/computation.


REFERENCES

Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.

1
 
2
Philippe Audebaud. Partial objects in the calculus of constructions. In Proceedings 6th Annual IEEE Symp. on Logic in Computer Science, LICS'91, Amsterdam, The Netherlands, 15-18 July 1991, pages 86--95. IEEE Computer Society Press, Los Alamitos, CA, 1991.
 
3
 
4
 
5
Venanzio Capretta. General recursion via coinductive types. LMCS-1, 2:1, 2005.
 
6
Venanzio Capretta. Formalization accompanying general recursion via coinductive types (rec coind.v). Downloaded 31-July-2007, 2007.
 
7
 
8
Development Team For Coq. The Coq Proof Assistant Reference Manual. LogiCal Project, 2006. Version 8.1.
 
9
Robert L. Constable and Scott F. Smith. Partial objects in constructive type theory. In LICS, pages 183--193. IEEE Computer Society, 1987.
 
10
 
11
Peter Dybjer. A general formulation of simultaneous inductive-recursive definitions in type theory. J. Symb. Log, 65(2):525--549, 2000.
 
12
David Pichardie Gilles Barthe, Julien Forest and Vlad Rusu. Defining and reasoning about recursive functions: a practical tool for the coq proof assistant. In Proc. of 8th International Symposium on Functional and Logic Programming (FLOPS'06), number 3945 in Lecture Notes in Computer Science, pages 114--129. http://www.springer.de/comp/lncs/index.htmlSpringer-Verlag, 2006.
 
13
 
14
 
15
 
16
S. Krstic and J. Matthews. Inductive invariants for nested recursion, 2003.
 
17
D. E. Knuth. Algorithms. 236(4):63--66, 69--72, 79--78, 80, April 1977.
 
18
 
19
M. Niqui and Y. Bertot. Qarith: Coq formalisation of lazy rational arithmetic, 2003.
 
20
R. S. Nikhil. Id language reference manual (version 90.1). Technical Report 284-2, 1991.
 
21
 
22
Bengt Nordström. The ALF proof editor. In Proceedings of the Workshop on Types for Proofs and Programs, pages 253--266, Nijmegen, 1993.
23
 
24
 
25
Scott F. Smith. Hybrid partial-total type theory. Int. J. Found. Comput. Sci, 6(3):235--263, 1995.
 
26
D. A. Turner. Total functional programming. 10(7):751--768, 2004. http://www.jucs.org/jucs 10 7/totalfunctional programming.
 
27
Philip Wadler. Monads for functional programming. In M. Broy, editor, Program Design Calculi: Proceedings of the 1992 Marktoberdorf International Summer School. Springer-Verlag, 1993.