skip to main content
10.1145/1088348.1088356acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Putting curry-howard to work

Published:30 September 2005Publication History

ABSTRACT

The Curry-Howard isomorphism states that types are propositions and that programs are proofs. This allows programmers to state and enforce invariants of programs by using types. Unfortunately, the type systems of today's functional languages cannot directly express interesting properties of programs. To alleviate this problem, we propose the addition of three new features to functional programming languages such as Haskell: Generalized Algebraic Datatypes, Extensible Kind Systems, and the generation, propagation, and discharging of Static Propositions. These three new features are backward compatible with existing features, and combine to enable a new programming paradigm for functional programmers. This paradigm makes it possible to state and enforce interesting properties of programs using the type system, and it does this in manner that leaves intact the functional programming style, known and loved by functional programmers everywhere.

References

  1. Lennart Augustsson. Cayenne - a language with dependent types. ACM SIGPLAN Notices, 34(1):239--250, January 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Lennart Augustsson. Equality proofs in cayenne, July 11 2000.]]Google ScholarGoogle Scholar
  3. Lennart Augustsson and Kent Petersson. Silly type families. Available from: http://www.cs.pdx.edu/~sheard/papers/silly.pdf, 1994.]]Google ScholarGoogle Scholar
  4. Arthur I. Baars and S. Doaitse Swierstra. Typing dynamic typing. In Proceedings of the Seventh ACM SIGPLAN International Conference on Functional Programming, pages 157--166. ACM Press, New York, September 2002. Also appears in ACM SIGPLAN Notices 37/9.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. H. P. Barendregt. Lambda calculi with types. In D. M. Gabbay, Samson Abramsky, and T. S. E. Maibaum, editors, Handbook of Logic in Computer Science, volume 2. Oxford University Press, Oxford, 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. James Cheney and Ralf Hinze. First-class phantom types. Technical Report TR2003-1901, Cornell University, 2003. Also available from: http://www.informatik.uni-bonn.de/~ralf/publications/Phantom.pdf.]]Google ScholarGoogle Scholar
  7. Catarina Coquand. Agda is a system for incrementally developing proofs and programs. Web page describing AGDA: http://www.cs.chalmers.se/~catarina/agda/ .]]Google ScholarGoogle Scholar
  8. T. Coquand and P. Dybjer. Inductive definitions and type theory an introduction (preliminary version). Lecture Notes in Computer Science, 880:60--76, 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Rowan Davies. A refinement-type checker for Standard ML. In International Conference on Algebraic Methodology and Software Technology, volume 1349 of Lecture Notes in Computer Science. Springer-Verlag, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Dominic Duggan. Dynamic typing for distributed programming in polymorphic languages. ACM Transactions on Programming Languages and Systems, 21(1):11--45, January 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. P. Dybjer and A. Setzer. A finite axiomatization of inductive-recursive definitions. Lecture Notes in Computer Science, 1581:129--146, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. R. Harper and R. Pollack. Type checking with universes. Theoretical Computer Science, 89(1):107--136, October 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Robert Harper, Furio Honsell, and Gordon Plotkin. A framework for defining logics. Journal of the ACM, 40(1):143--184, January 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Ralf Hinze and James Cheney. A lightweight implementation of generics and dynamics. In Manuel Chakravarty, editor, Proceedings of the ACM SIGPLAN 2002 Haskell Workshop, pages 90--104. ACM SIGPLAN, October 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Infopipe web sites:. http://www.cs.pdx.edu/~walpole/infopipes.html, and http://woodworm.cs.uml.edu/~rprice/ep/koster/.]]Google ScholarGoogle Scholar
  16. Mark P. Jones. A system of constructor classes: overloading and implicit higher-order polymorphism. In Proceedings of the Conference on Functional Programming Languages and Computer Architecture, Copenhagen, Denmark, June 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Simon Peyton Jones and Mark Shields. Practical type inference for arbitrary-rank types. Technical report, Microsoft Research, December 2003. http://research.microsoft.com/Users/simonpj/.]]Google ScholarGoogle Scholar
  18. Simon Peyton Jones, Geoffrey Washburn, and Stephanie Weirich. Wobbly types: type inference for generalised algebraic data types. http://research.microsoft.com/Users/simonpj/, 2004.]]Google ScholarGoogle Scholar
  19. A. J. Kfoury and Said Jahama. Type reconstruction in the presence of polymorphic recursion and recursive types. Technical report, March 21 2000.]]Google ScholarGoogle Scholar
  20. Zhaohui Luo and Robert Pollack. LEGO proof development system: User's manual. Technical Report ECS-LFCS-92-211, LFCS, Computer Science Dept., University of Edinburgh, The King's Buildings, Edinburgh EH9 3JZ, May 1992. Updated version.]]Google ScholarGoogle Scholar
  21. Connor McBride. Epigram: Practical programming with dependent types. In Notes from the 5th International Summer School on Advanced Functional Programming, August 2004. Available at: http://www.dur.ac.uk/CARG/epigram/epigram-afpnotes.pdf .]]Google ScholarGoogle Scholar
  22. G. Morrisett, D. Walker, K. Crary, and N. Glew. From system F to typed assembly language. ACM Transactions on Programming Languages and Systems (TOPLAS), 21(3):528--569, May 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Bengt Nordstrom. The ALF proof editor, March 20 1996.]]Google ScholarGoogle Scholar
  24. Emir Pasalic. The Role of Type Equality in Meta-programming. PhD thesis, OGI School of Science & Engineering at OHSU, October 2004. Available from: http://www.cs.rice.edu/~pasalic/thesis/body.pdf.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Emir Pasalic and Nathan Linger. Meta-programming with typed object-language representations. In Generative Programming and Component Engineering (GPCE'04), pages 136 -- 167, October 2004. LNCS volume 3286.]]Google ScholarGoogle Scholar
  26. Lawrence C. Paulson. Isabelle: The next 700 theorem provers. In P. Odifreddi, editor, Logic and Computer Science, pages 361--386. Academic Press, 1990.]]Google ScholarGoogle Scholar
  27. Frank Pfenning. Logic programming in the LF logical framework. In Gérard Huet and Gordon Plotkin, editors, Logical Frameworks, pages 149--181, Cambridge, England, 1991. Cambridge University Press.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Frank Pfenning and Carsten Schürmann. System description: Twelf - A meta-logical framework for deductive systems. In Harald Ganzinger, editor, Proceedings of the 16th International Conference on Automated Deduction (CADE-16), volume 1632 of LNAI, pages 202--206, Berlin, July 7-10, 1999. Springer-Verlag.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Tim Sheard. Languages of the future. Onward Track, OOPSLA'04. Reprinted in: ACM SIGPLAN Notices, Dec. 2004., 39(10):116--119, October 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Tim Sheard, James Hook, and Nathan Linger. GADTs + extensible kind system = dependent programming. Technical report, Portland State University, 2005. http://www.cs.pdx.edu/~sheard.]]Google ScholarGoogle Scholar
  31. Tim Sheard and Nathan Linger. Programming with static invariants in Omega, September 2004. Available from: http://www.cs.pdx.edu/~sheard/ .]]Google ScholarGoogle Scholar
  32. Tim Sheard and Emir Pasalic. Meta-programming with built-in type equality. In Logical Frameworks and Meta-Languages workshop, July 2004. Available at: http://cs-www.cs.yale.edu/homes/carsten/lfm04/.]]Google ScholarGoogle Scholar
  33. Vincent Simonet and Francois Pottier. Constraint-based type inference for guarded algebraic data types. Available from: http://cristal.inria.fr/~simonet/publis/index.en.html.]]Google ScholarGoogle Scholar
  34. Peter J. Stuckey and Martin Sulzmann. Type inference for guarded recursive data types, February 2005. Available from: http://www.comp.nus.edu.sg/~sulzmann/ .]]Google ScholarGoogle Scholar
  35. Aaron Stump. Imperative LF meta-programming. In Logical Frameworks and Meta-Languages workshop, July 2004. Available at: http://cs-www.cs.yale.edu/homes/carsten/lfm04/.]]Google ScholarGoogle Scholar
  36. Martin Sulzmann and Meng Wang. A systematic translation of guarded recursive data types to existential types, February 2005. Available from: http://www.comp.nus.edu.sg/~sulzmann/ .]]Google ScholarGoogle Scholar
  37. The Coq Development Team. The Coq Proof Assistant Reference Manual, Version 7.4. INRIA, 2003. http://pauillac.inria.fr/coq/doc/main.html.]]Google ScholarGoogle Scholar
  38. Stephanie Weirich. Type-safe cast: (functional pearl). ACM SIGPLAN Notices, 35(9):58--67, September 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. Hongwei Xi. Dependent Types in Practical Programming. PhD thesis, Carnegie Mellon University, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. Hongwei Xi. Dead code elimination through dependent types. Lecture Notes in Computer Science, 1551:228--242, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. Hongwei Xi, Chiyan Chen, and Gang Chen. Guarded recursive datatype constructors. In POPL: 30th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Hongwei Xi and Frank Pfenning. Eliminating array bound checking through dependent types. ACM SIGPLAN Notices, 33(5):249--257, May 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  43. Hongwei Xi and Frank Pfenning. Dependent types in practical programming. In ACM, editor, 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.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Putting curry-howard to work

    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 Conferences
      Haskell '05: Proceedings of the 2005 ACM SIGPLAN workshop on Haskell
      September 2005
      126 pages
      ISBN:159593071X
      DOI:10.1145/1088348
      • Program Chair:
      • Daan Leijen

      Copyright © 2005 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: 30 September 2005

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • Article

      Acceptance Rates

      Overall Acceptance Rate57of143submissions,40%

      Upcoming Conference

      ICFP '24

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader