Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1244381.1244400acmconferencesArticle/Chapter ViewAbstractPublication PagespepmConference Proceedingsconference-collections
Article

Concoqtion: indexed types now!

Published: 15 January 2007 Publication History

Abstract

Almost twenty years after the pioneering efforts of Cardelli, the programming languages community is vigorously pursuing ways to incorporate Fω-style indexed types into programming languages. This paper advocates Concoqtion, a practical approach to adding such highly expressive types to full-fledged programming languages. The approach is applied to MetaOCaml using the Coq proof checker to conservatively extend Hindley-Milner type inference. The implementation of MetaOCaml Concoqtion requires minimal modifications to the syntax, the type checker, and the compiler; and yields a language comparable in notation to the leading proposals. The resulting language provides unlimited expressiveness in the type system while maintaining decidability. Furthermore, programmers can take advantage of a wide range of libraries not only for the programming language but also for the indexed types. Programming in MetaOCaml Concoqtion is illustrated with small examples and a case study implementing a statically-typed domain-specific language.

References

[1]
Lennart Augustsson. Cayenne --- a language with dependent types. In Proceedings of the ACM SIGPLAN International Conference on Functional Programming (ICFP '98), volume 34(1) of ACM SIGPLAN Notices, pages 239--250. ACM, June 1999.
[2]
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 Lecture Notes in Computer Science, pages 115--129. Springer, 2003.
[3]
Luca Cardelli. Typeful programming. In E. J. Neuhold and M. Paul, editors, Formal Description of Programming Concepts, IFIP State-of-the-Art Reports, pages 431--507. Springer-Verlag, New York, 1991.
[4]
Chiyan Chen and Hongwei Xi. Implementing typeful program transformations. In ACM SIGPLAN Workshop on Partial Evaluation and Semantics Based Program Manipulation, pages 20--28. ACM Press, June 2003.
[5]
Chiyan Chen and Hongwei Xi. Combining programming with theorem proving. In ICFP '05: Proceedings of the tenth ACM SIGPLAN international conference on Functional programming, pages 66--77, New York, NY, USA, 2005. ACM Press.
[6]
James Cheney and Ralf Hinze. First-class phantom types. Technical Report 1901, Cornell University, 2003.
[7]
The MetaOCaml Concoqtion web site. Online at http://www.metaocaml.org/concoqtion, July 2006.
[8]
The Coq. The coq proof assistant: Reference manual: Version 7.2, February 2002.
[9]
Thierry Coquand and Gérard Huet. Constructions: A higher order proof system for mechanizing mathematics. In EUROCAL85, volume 203 of Lecture Notes in Computer Science, pages 151--184, Berlin, 1986. Springer-Verlag.
[10]
Krzysztof Czarneckil, John O'Donnell, Jörg Striegnitz, and Walid Taha. DSL implementation in metaocaml, template haskell, and C++. In Batory, Consel, Lengauer, and Odersky, editors, Dagstuhl Workshop on Domain-specific Program Generation, LNCS. 2004.
[11]
Jean-Yves Girard. Interprétation fonctionelle et élimination des coupures dans l'arithmétique d'ordre supérieur. Thèse de doctorat d'etat, University of Paris VII, 1972.
[12]
Paul Hudak, Modular domain specific languages and tools. In Proceedings of Fifth International Conference on Software Reuse, pages 134--142. IEEE Computer Society, June 1998.
[13]
Trevor Jim, Greg Morrisett, Dan Grossman, Michael Hicks, James Cheney, and Yanling Wang. Cyclone: A safe dialect of C. In Proceedings of the General Track: 2002 USENIX Annual Technical Conference, June 10--15, 2002, Monterey, California, USA, Berkeley, CA, USA, 2002. USENIX.
[14]
N. D. Jones, P. Sestoft, and H. Sondergaard. Mix: a self-applicable partial evaluator for experiments in compiler generation. Technical Report DIKU Report 87/08, University of Copenhagen, Denmark, 1987.
[15]
Andrew Kennedy and Claudio V. Russo. Generalized algebraic data types and object-oriented programming. In Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications. ACM Press, 2005.
[16]
Xavier Leroy. Objective Caml, 2000. Available from http://caml.inria.fr/ocaml/.
[17]
Xavier Leroy. Formal certification of a compiler back-end or: programming a compiler with a proof assistant. In POPL'06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 42--54, New York, NY, USA, 2006. ACM Press.
[18]
MetaOCaml: A compiled, type-safe multi-stage programming language. Available online from http://www.metaocaml.org/, 2004.
[19]
Emir Pasalic, Jeremy Siek, and Walid Taha. Concoqtion: Mixing dependent types and Hindley-Milner type inference (extended version). Technical report, Rice University, 2006. Available from http://www.metaocaml.org/concoqtion.
[20]
Emir Pašalić, Walid Taha, and Tim Sheard. Tagless staged interpreters for typed languages. In the International Conference on Functional Programming (ICFP '02), Pittsburgh, USA, October 2002. ACM.
[21]
Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, and Geoffrey Washburn. Simple unification-based type inference for GADTs. submitted to ICFP 2006, April 2006.
[22]
Zhong Shao, Bratin Saha, Valery Trifonov, and Nikolaos Papaspyrou. A type system for certified binaries. ACM SIGPLAN Notices, 31(1):217--232, January 2002.
[23]
Tim Sheard. Languages of the future. ACM SIGPLAN Notices, 39(12):119--132, 2004.
[24]
Tim Sheard and Emir Pasalic. Meta-programming with built-in type equality. In Fourth International Workshop on Logical Frameworks and Meta-Languages (LFM'04), Cork, Ireland, July 2004.
[25]
Vincent Simonet and François Pottier. A constraint-based approach to guarded algebraic data types. ACM Transactions on Programming Languages and Systems, December 2005.
[26]
Walid Taha. A gentle introduction to multi-stage programming. In Don Batory, Charles Consel, Christian Lengauer, and Martin Odersky, editors, Domain-specific Program Generation, LNCS. 2004.
[27]
Walid Taha, Henning Makholm, and John Hughes. Tag elimination and Jones-optimality. In Olivier Danvy and Andrzej Filinksi, editors, Programs as Data Objects, volume 2053 of Lecture Notes in Computer Science, pages 257--275, 2001.
[28]
Walid Taha and Michael Florentin Nielsen. Environment classifiers. In The Symposium on Principles of Programming Languages (POPL '03), New Orleans, 2003.
[29]
Walid Taha and Tim Sheard. Multi-stage programming with explicit annotations. In Proceedings of the Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM), pages 203--217, Amsterdam, 1997. ACM Press.
[30]
Hongwei Xi, Chiyan Chen, and Gang Chen. Guarded recursive datatype constructors. In POPL '03: Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 224--235, New York, NY, USA, 2003. ACM Press.
[31]
Hongwei Xi and Frank Pfenning. Eliminating array bound checking through dependent types. In Proceedings of the ACM SIGPLAN'98 Conference on Programming Language Design and Implementation (PLDI), pages 249--257, Montreal, Canada, 17--19 June 1998.
[32]
Hongwei Xi and Frank Pfenning. Dependent types in practical programming. In POPL '99. Proceedings of the 26th ACM SIGPLAN-SIGACT on Principles of Programming languages, January 20--22, 1999, San Antonio, TX, ACM SIGPLAN Notices, pages 214--227, New York, NY, USA, 1999. ACM Press.

Cited By

View all
  • (2022)Staging with class: a specification for typed template HaskellProceedings of the ACM on Programming Languages10.1145/34987236:POPL(1-30)Online publication date: 12-Jan-2022
  • (2019)A Dependently Typed Multi-stage CalculusProgramming Languages and Systems10.1007/978-3-030-34175-6_4(53-72)Online publication date: 18-Nov-2019
  • (2017)Expressive and strongly type-safe code generationProceedings of the 19th International Symposium on Principles and Practice of Declarative Programming10.1145/3131851.3131872(199-210)Online publication date: 9-Oct-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PEPM '07: Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
January 2007
180 pages
ISBN:9781595936202
DOI:10.1145/1244381
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 January 2007

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

PEPM07
Sponsor:

Acceptance Rates

Overall Acceptance Rate 66 of 120 submissions, 55%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)10
  • Downloads (Last 6 weeks)4
Reflects downloads up to 24 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2022)Staging with class: a specification for typed template HaskellProceedings of the ACM on Programming Languages10.1145/34987236:POPL(1-30)Online publication date: 12-Jan-2022
  • (2019)A Dependently Typed Multi-stage CalculusProgramming Languages and Systems10.1007/978-3-030-34175-6_4(53-72)Online publication date: 18-Nov-2019
  • (2017)Expressive and strongly type-safe code generationProceedings of the 19th International Symposium on Principles and Practice of Declarative Programming10.1145/3131851.3131872(199-210)Online publication date: 9-Oct-2017
  • (2017)Verification of code generators via higher-order model checkingProceedings of the 2017 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/3018882.3018886(59-70)Online publication date: 2-Jan-2017
  • (2016)Staging beyond terms: prospects and challengesProceedings of the 2016 ACM SIGPLAN Workshop on Partial Evaluation and Program Manipulation10.1145/2847538.2847548(103-108)Online publication date: 11-Jan-2016
  • (2014)Early detection of type errors in C++ templatesProceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation10.1145/2543728.2543731(133-144)Online publication date: 11-Jan-2014
  • (2014)Extending Type Inference to Variational ProgramsACM Transactions on Programming Languages and Systems10.1145/251819036:1(1-54)Online publication date: 1-Mar-2014
  • (2013)Typed syntactic meta-programmingACM SIGPLAN Notices10.1145/2544174.250057548:9(73-86)Online publication date: 25-Sep-2013
  • (2013)Typed syntactic meta-programmingProceedings of the 18th ACM SIGPLAN international conference on Functional programming10.1145/2500365.2500575(73-86)Online publication date: 25-Sep-2013
  • (2011)Type-specialized staged programming with process separationHigher-Order and Symbolic Computation10.1007/s10990-012-9089-024:4(341-385)Online publication date: 1-Nov-2011
  • Show More Cited By

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