Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1481848.1481851acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
research-article

Positively dependent types

Published: 20 January 2009 Publication History

Abstract

This paper is part of a line of work on using the logical techniques of polarity and focusing to design a dependent programming language, with particular emphasis on programming with deductive systems such as programming languages and proof theories. Polarity emphasizes the distinction between positive types, which classify data, and negative types, which classify computation. In previous work, we showed how to use Zeilberger's higher-order formulation of focusing to integrate a positive function space for representing variable binding, an essential tool for specifying logical systems, with a standard negative computational function space. However, our previous work considers only a simply-typed language. The central technical contribution of the present paper is to extend higher-order focusing with a form of dependency that we call positively dependent types: We allow dependency on positive data, but not negative computation. Additionally, we present the syntax of dependent pair and function types using an iterated inductive definition, mapping positive data to types, which gives an account of type-level computation. We construct our language inside the dependently typed programming language Agda 2, making essential use of coinductive types and induction-recursion.

References

[1]
Thorsten Altenkirch, Conor McBride, and Wouter Swierstra. Observational equality, now! In Programming Languages meets Program Verification Workshop, 2007.
[2]
Jean-Marc Andreoli. Logic programming with focusing proofs in linear logic. Journal of Logic and Computation, 2(3):297--347, 1992.
[3]
Lennart Augustsson. Cayenne -- a language with dependent types. In International Conference on Functional Programming, 1998.
[4]
Steve Awodey and Andrej Bauer. Propositions as {types}. Journal of Logic and Computation, 14(4):447--471, 2004.
[5]
Yves Bertot and Pierre Castéran. Interactive Theorem Proving and Program Development: Coq'Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science. Springer, 2004.
[6]
Edwin Brady. Practical Implementation of a Dependently Typed Functional Programming Language. PhD thesis, Durham University, 2005.
[7]
Manuel Chakravarty, Gabrielle Keller, and Simon Peyton Jones. Associated type synonyms. In ACM SIGPLAN International Conference on Functional Programming, 2005.
[8]
Chiyan Chen and Hongwei Xi. Combining programming with theorem proving. In International Conference on Functional Programming, 2005.
[9]
James Cheney and Ralk Hinze. Phantom types. Technical Report CUCIS TR20003-1901, Cornell University, 2003.
[10]
Brian Chin, Shane Markstrum, and Todd Millstein. Semantic type qualifiers. In Programming Language Design and Implementation, 2005.
[11]
Jeremy Condit, Matthew Harren, Zachary Anderson, David Gay, and George C. Necula. Dependent types for low-level programming. In European Symposium on Programming, 2007.
[12]
Robert L. Constable, Stuart F. Allen, H. M. Bromley, W. R. Cleaveland, J. F. Cremer, R. W. Harper, Douglas J. Howe, T. B. Knoblock, N. P. Mendler, P. Panangaden, James T. Sasaki, and Scott F. Smith. Implementing Mathematics with the NuPRL Proof Development System. Prentice Hall, 1986.
[13]
Karl Crary and Stephanie Weirich. Flexible type analysis. In International Conference on Functional Programming, 1999.
[14]
Joshua Dunfield. A Unified System of Type Refinements. PhD thesis, Carnegie Mellon University, August 2007. CMU-CS-07-129.
[15]
Joshua Dunfield and Frank Pfenning. Tridirectional typechecking. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2004.
[16]
Peter Dybjer and Anton Setzer. Indexed induction-recursion. In Proof Theory in Computer Science, pages 93--113. Springer, 2001.
[17]
Cormac Flanagan. Hybrid type checking. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 245--256, 2006.
[18]
Seth Fogarty, Emir Pasalic, Jeremy Siek, and Walid Taha. Concoqtion: indexed types now! In ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation, pages 112--121, New York, NY, USA, 2007. ACM Press.
[19]
Jean-Yves Girard. On the unity of logic. Annals of pure and applied logic, 59(3):201--217, 1993.
[20]
Jean-Yves Girard. Locus solum: From the rules of logic to the logic of rules. Mathematical Structures in Computer Science, 11(3):301--506, 2001.
[21]
Robert Harper, Furio Honsell, and Gordon Plotkin. A framework for defining logics. Journal of the Association for Computing Machinery, 40(1), 1993.
[22]
Robert Harper, John C. Mitchell, and Eugenio Moggi. Higher-order modules and the phase distinction. In Symposium on Principles of Programming Languages, 1990.
[23]
Robert Harper and Greg Morrisett. Compiling polymorphism using intensional type analysis. In Symposium on Principles of Programming Languages, 1995.
[24]
Olivier Laurent. Etude de la polarisation en logique. Thèse de doctorat, Université Aix-Marseille II, March 2002.
[25]
Paul B. Levy. Call-by-push-value. PhD thesis, Queen Mary, University of London, 2001.
[26]
Chuck Liang and Dale Miller. Focusing and polarization in intuitionistic logic. In J. Duparc and T. A. Henzinger, editors, CSL 2007: Computer Science Logic, volume 4646 of LNCS, pages 451--465. Springer-Verlag, 2007.
[27]
Daniel R. Licata. Dependently typed programming with domain-specific logics (thesis proposal). Available from http://www.cs.cmu.edu/~drl, 2008.
[28]
Daniel R. Licata and Robert Harper. A formulation of Dependent ML with explicit equality proofs. Technical Report CMU-CS-05-178, Department of Computer Science, Carnegie Mellon University, 2005.
[29]
Daniel R. Licata, Noam Zeilberger, and Robert Harper. Focusing on binding and computation. In IEEE Symposium on Logic in Computer Science, 2008.
[30]
William Lovas and Frank Pfenning. A bidirectional refinement type system for LF. Electronic Notes in Theoretical Computer Science, 196:113--128, 2008.
[31]
Keywords: LF, refinement types, subtyping, dependent types, intersection types
[32]
Per Martin-Löf. Hauptsatz for the intuitionistic theory of iterated inductive definitions. In J. E. Fenstad, editor, Proceedings of the Second Scandinavian Logic Symposium, pages 179--216, Amsterdam, 1971. North Holland.
[33]
Conor McBride and James McKinna. The view from the left. Journal of Functional Programming, 15(1), 2004.
[34]
Alexandre Miquel. The implicit calculus of constructions: Extending pure type systems with an intersection type binder and subtyping. In International Conference on Typed Lambda Calculi and Applications, 2001.
[35]
Aleksandar Nanevski. A modal calculus for exception handling. In Intuitionistic Modal Logic and Applications, 2005.
[36]
Aleksandar Nanevski, Greg Morrisett, and Lars Birkedal. Polymorphism and separation in Hoare Type Theory. In ACM SIGPLAN International Conference on Functional Programming, pages 62--73, Portland, Oregon, 2006.
[37]
Ulf Norell. Towards a practical programming language based on dependent type theory. PhD thesis, Chalmers University of Technology, 2007.
[38]
Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, and Geoffrey Washburn. Simple unification-based type inference for GADTs. In ACM SIGPLAN International Conference on Functional Programming, 2006.
[39]
Frank Pfenning. Intensionality, extensionality, and proof irrelevance in modal type theory. In IEEE Symposium on Logic in Computer Science, 2001.
[40]
Brigitte Pientka. A type-theoretic foundation for programming with higher-order abstract syntax and first-class substitutions. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 371--382, 2008.
[41]
Gordon Plotkin and John Power. Notions of computation determine monads. In Proc. FOSSACS 2002, Lecture Notes in Computer Science 2303, pages 342--356. Springer, 2002.
[42]
Adam Poswolsky and Carsten Schürmann. Practical programming with higher-order encodings and dependent types. In European Symposium on Programming, 2008.
[43]
Susmit Sarkar. A cost-effective foundational certified code system. Thesis Proposal, Carenegie Mellon University, 2005.
[44]
Zhong Shao, Valery Trifonov, Bratin Saha, and Nikolaos Papaspyrou. A type system for certified binaries. ACM Transactions on Programming Languages and Systems, 27(1):1--45, 2005.
[45]
Tim Sheard. Languages of the future. In Conference on Object-Oriented Programming, Systems, Languages, and Applications, 2004.
[46]
Matthieu Sozeau. Programing finger trees in Coq. In ACM SIGPLAN International Conference on Functional Programming. Association for Computing Machinery, 2007.
[47]
Wouter Swierstra and Thorsten Altenkirch. Beauty in the beast: A functional semantics of the awkward squad. In ACM SIGPLAN Workshop on Haskell, pages 25--36, 2007.
[48]
Edwin Westbrook, Aaron Stump, and Ian Wehrman. A language-based approach to functionally correct imperative programming. In International Conference on Functional Programming, 2005.
[49]
Hongwei Xi, Chiyan Chen, and Gang Chen. Guarded recursive datatype constructors. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 2003.
[50]
Hongwei Xi and Frank Pfenning. Eliminating array bound checking through dependent types. In Conference on Programming Language Design and Implementation, 1998.
[51]
Hongwei Xi and Frank Pfenning. Dependent types in practical programming. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 1999.
[52]
Noam Zeilberger. Focusing and higher-order abstract syntax. In ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 359--369, 2008.
[53]
Noam Zeilberger. On the unity of duality. Annals of Pure and Applied Logic, 153(1-3), 2008. Special issue on 'Classical Logic and Computation'.
[54]
Christoph Zenger. Indizierte Typen. PhD thesis, Universitat Karlsruhe, 1998.

Cited By

View all
  • (2018)Amplifying Quiet VoicesACM Transactions on Computer-Human Interaction10.1145/313939825:1(1-34)Online publication date: 30-Jan-2018
  • (2017)Effective stateless model checking for C/C++ concurrencyProceedings of the ACM on Programming Languages10.1145/31581052:POPL(1-32)Online publication date: 27-Dec-2017
  • (2017)Intrinsically-typed definitional interpreters for imperative languagesProceedings of the ACM on Programming Languages10.1145/31581042:POPL(1-34)Online publication date: 27-Dec-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLPV '09: Proceedings of the 3rd workshop on Programming languages meets program verification
January 2009
90 pages
ISBN:9781605583303
DOI:10.1145/1481848
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: 20 January 2009

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. agda
  2. dependent types
  3. polarity

Qualifiers

  • Research-article

Conference

POPL09
Sponsor:

Acceptance Rates

Overall Acceptance Rate 18 of 25 submissions, 72%

Upcoming Conference

POPL '26

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 16 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2018)Amplifying Quiet VoicesACM Transactions on Computer-Human Interaction10.1145/313939825:1(1-34)Online publication date: 30-Jan-2018
  • (2017)Effective stateless model checking for C/C++ concurrencyProceedings of the ACM on Programming Languages10.1145/31581052:POPL(1-32)Online publication date: 27-Dec-2017
  • (2017)Intrinsically-typed definitional interpreters for imperative languagesProceedings of the ACM on Programming Languages10.1145/31581042:POPL(1-34)Online publication date: 27-Dec-2017
  • (2017)Digital Privacy Challenges with Shared Mobile Phone Use in BangladeshProceedings of the ACM on Human-Computer Interaction10.1145/31346521:CSCW(1-20)Online publication date: 6-Dec-2017
  • (2016)A Classical Realizability Model for a Semantical Value RestrictionProceedings of the 25th European Symposium on Programming Languages and Systems - Volume 963210.1007/978-3-662-49498-1_19(476-502)Online publication date: 2-Apr-2016
  • (2014)Combining proofs and programs in a dependently typed languageACM SIGPLAN Notices10.1145/2578855.253588349:1(33-45)Online publication date: 8-Jan-2014
  • (2014)Combining proofs and programs in a dependently typed languageProceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2535838.2535883(33-45)Online publication date: 11-Jan-2014
  • (2012)Giving Haskell a promotionProceedings of the 8th ACM SIGPLAN workshop on Types in language design and implementation10.1145/2103786.2103795(53-66)Online publication date: 28-Jan-2012

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media