skip to main content
10.1145/1389449.1389469acmconferencesArticle/Chapter ViewAbstractPublication PagesppdpConference Proceedingsconference-collections
research-article

Programming with proofs and explicit contexts

Published: 15 July 2008 Publication History

Abstract

This paper explores a new point in the design space of functional programming: functional programming with dependently-typed higher-order data structures described in the logical framework LF. This allows us to program with proofs as higher-order data. We present a decidable bidirectional type system that distinguishes between dependently-typed data and computations. To support reasoning about open data, our foundation makes contexts explicit. This provides us with a concise characterization of open data, which is crucial to elegantly describe proofs. In addition, we present an operational semantics for this language based on higherorder pattern matching for dependently typed objects. Based on this development, we prove progress and preservation

References

[1]
L. Augustsson. Cayenne-a language with dependent types. In 3rd International Conference on Functional Programming (ICFP '98), pages 239--250. ACM, 1998.]]
[2]
J. Cheney and R. Hinze. First-class phantom types. Technical Report CUCIS TR2003-1901, Cornell University, 2003.]]
[3]
J. Despeyroux and P. Leleu. Recursion over objects of functional type. Mathematical Structures in Computer Science, 11 (4):555--572, 2001.]]
[4]
J. Despeyroux and P. Leleu. Primitive recursion for higher order abstract syntax with dependent types. In International Workshop on Intuitionistic Modal Logics and Applications (IMLA), 1999.]]
[5]
J. Despeyroux, F. Pfenning, and C. Schürmann. Primitive recursion for higher-order abstract syntax. In Proceedings of the Third International Conference on Typed Lambda Calculus and Applications (TLCA'97), pages 147--163. Springer, 1997. Extended version available as Technical Report CMU-CS-96-172, Carnegie Mellon University.]]
[6]
J. Dunfield and B. Pientka. Case analysis of higher-order data. In International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice (LFMTP'08), Electronic Notes in Theoretical Computer Science (ENTCS). Elsevier, June 2008.]]
[7]
M. Gabbay and A. Pitts. A new approach to abstract syntax involving binders. In G. Longo, editor, Proceedings of the 14th Annual Symposium on Logic in Computer Science (LICS'99), pages 214--224. IEEE Computer Society Press, 1999.]]
[8]
A. Gacek, D. Miller, and G. Nadathur. Combining generic judgments with recursive definitions. In F. Pfenning, editor, 23rd Symposium on Logic in Computer Science. IEEE Computer Society Press, 2008.]]
[9]
R. Harper, F. Honsell, and G. Plotkin. A framework for defining logics. Journal of the ACM, 40(1):143--184, January 1993.]]
[10]
D. R. Licata, N. Zeilberger, and R. Harper. Focusing on binding and computation. In F. Pfenning, editor, 23rd Symposium on Logic in Computer Science. IEEE Computer Society Press, 2008.]]
[11]
C. McBride and J. McKinna. The view from the left. Journal of Functional Programming, 14(1):69--111, 2004.]]
[12]
A. McCreight and C. Schürmann. A meta-linear logical framework. In 4th International Workshop on Logical Frame-works and Meta-Languages (LFM'04), 2004.]]
[13]
D. Miller. Unification of simply typed lambda-terms as logic programming. In Eighth International Logic Programming Conference, pages 255--269, Paris, France, June 1991. MIT Press.]]
[14]
D. Miller. A logic programming language with lambda abstraction, function variables, and simple unification. Journal of Logic and Computation, 1(4):497--536, 1991.]]
[15]
A. Nanevski, F. Pfenning, and B. Pientka. Contextual modal type theory. ACM Transactions on Computational Logic, 9 (3), 2008.]]
[16]
S. Peyton Jones, D. Vytiniotis, S. Weirich, and G. Washburn. Simple unification-based type inference for GADTs. In 11th ACM SIGPLAN Int'l Conference on Functional Programming (ICFP '06), pages 50--61, Sept. 2006.]]
[17]
F. Pfenning. Unification and anti-unification in the Calculus of Constructions. In Sixth Annual IEEE Symposium on Logic in Computer Science, pages 74-85, Amsterdam, The Netherlands, July 1991.]]
[18]
F. Pfenning. Logical frameworks. In A. Robinson and A. Voronkov, editors, Handbook of Automated Reasoning, pages 1063--1147. Elsevier, 2001.]]
[19]
F. Pfenning and C. Schürmann. System description: Twelf ¿ a meta-logical framework for deductive systems. In H. Ganzinger, editor, Proceedings of the 16th International Conference on Automated Deduction (CADE-16), pages 202--206. Springer LNAI 1632, 1999.]]
[20]
B. Pientka. Tabled higher-order logic programming. PhD thesis, Department of Computer Science, Carnegie Mellon University, 2003. CMU-CS-03-185.]]
[21]
B. Pientka. A type-theoretic foundation for programming with higher-order abstract syntax and first-class substitutions. In 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'08), pages 371--382. ACM, 2008.]]
[22]
B. Pientka and F. Pfenning. Optimizing higher-order pattern unification. In F. Baader, editor, 19th International Conference on Automated Deduction, Miami, USA, Lecture Notes in Artificial Intelligence (LNAI) 2741, pages 473--487. Springer-Verlag, 2003.]]
[23]
A. Poswolsky and C. Schürmann. Practical programming with higher-order encodings and dependent types. In Proceedings of the 17th European Symposium on Programming (ESOP'08), Mar. 2008.]]
[24]
C. Schürmann. Automating the Meta Theory of Deductive Systems. PhD thesis, Department of Computer Science, Carnegie Mellon University, 2000. CMU-CS-00-146.]]
[25]
C. Schürmann, A. Poswolsky, and J. Sarnat. The ∇-calculus. Functional programming with higher-order encodings. In P. Urzyczyn, editor, Proceedings of the 7th International Conference on Typed Lambda Calculi and Applications (TLCA'05), volume 3461 of Lecture Notes in Computer Science, pages 339--353. Springer, 2005.]]
[26]
T. Sheard and E. Pasalic. Meta-programming with built-in type equality. In Int'l Workshop on Logical Frameworks and Meta-languages (LFM '04), pages 106--124, 2004.]]
[27]
M. R. Shinwell, A. M. Pitts, and M. J. Gabbay. FreshML: programming with binders made simple. In 8th International Conference on Functional Programming (ICFP'03), pages 263--274, New York, NY, USA, 2003. ACM Press.]]
[28]
K. Watkins, I. Cervesato, F. Pfenning, and D. Walker. A concurrent logical framework I: Judgments and properties. Technical Report CMU-CS-02-101, Department of Computer Science, Carnegie Mellon University, 2002.]]
[29]
H. Xi and F. Pfenning. Dependent types in practical programming. In 26th ACMSIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'99), pages 214--227. ACM Press, 1999.]]

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PPDP '08: Proceedings of the 10th international ACM SIGPLAN conference on Principles and practice of declarative programming
July 2008
278 pages
ISBN:9781605581170
DOI:10.1145/1389449
  • General Chair:
  • Sergio Antoy,
  • Program Chair:
  • Elvira Albert
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 15 July 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. dependent types
  2. logical frameworks
  3. type theory

Qualifiers

  • Research-article

Conference

PPDP08
Sponsor:

Acceptance Rates

PPDP '08 Paper Acceptance Rate 24 of 48 submissions, 50%;
Overall Acceptance Rate 230 of 486 submissions, 47%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)9
  • Downloads (Last 6 weeks)2
Reflects downloads up to 12 Jan 2025

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media