skip to main content
10.1145/604131.604150acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

Guarded recursive datatype constructors

Published:15 January 2003Publication History

ABSTRACT

We introduce a notion of guarded recursive (g.r.) datatype constructors, generalizing the notion of recursive datatypes in functional programming languages such as ML and Haskell. We address both theoretical and practical issues resulted from this generalization. On one hand, we design a type system to formalize the notion of g.r. datatype constructors and then prove the soundness of the type system. On the other hand, we present some significant applications (e.g., implementing objects, implementing staged computation, etc.) of g.r. datatype constructors, arguing that g.r. datatype constructors can have far-reaching consequences in programming. The main contribution of the paper lies in the recognition and then the formalization of a programming notion that is of both theoretical interest and practical use.

References

  1. L. Augustsson. Implementing Haskell overloading. In Functional Programming Languages and Computer Architecture, 93.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. K. B. Bruce. Foundations of Object-Oriented Languages. The MIT Press, Cambridge, MA, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. Chen and H. Xi. Implementing typed meta-programming. Available at http://www.cs.bu.edu/char126hwxi/academic/papers/TMP.ps, November 2002.]]Google ScholarGoogle Scholar
  4. A. Church. A formulation of the simple type theory of types. Journal of Symbolic Logic, 5:56--68, 1940.]]Google ScholarGoogle ScholarCross RefCross Ref
  5. K. Crary and S. Weirich. Flexible Type Analysis. In Proceedings of International Conference on Functional Programming (ICFP '99), Paris, France, 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. K. Crary, S. Weirich, and G. Morrisett. Intensional polymorphism in type-erasure semantics. In Proceedings of the International Conference on Functional Programming (ICFP '98), pages 301--312, Baltimore, MD, September 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. Davies and F. Pfenning. A Modal Analysis of Staged Computation. Journal of ACM, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. C. Dubois, F. Rouaix, and P. Weis. Generic Polymorphism. In Proceeding of the 22th ACM Symposium on Principles of Programming Languages (POPL '95), pages 118--129, London, UK, January 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. A. Goldenberg and D. Robson. Smalltalk-80: The Language and Its Implementation. Addison Wesley, 1983.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. R. W. Harper and G. Morrisett. Compiling polymorphism using intensional type analysis. In Conference Record of POPL '95: 22nd ACM SIGPLAN Symposium on Principles of Programming Languages, pages 130--141, San Francisco, 1995.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. K. Läufer and M. Odersky. Ploymorphic Type Inference and Abstract Data Types. ACM Transactions of Programming Languages and Systems (TOPLAS), 16(5):1411--1430, September 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. X. Leroy. Unboxed objects and polymorphic typing. In Conference Record of the Nineteenth Annual ACM SIGPLAN Symposium on Principles of Programming Languages, pages 177--188, Albuquerque, New Mexico, January 1992.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. C. Liu. Smalltalk, Objects, and Design. Manning Publications Co., Greenwich, CT 06830, 1996.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. R. Milner, M. Tofte, R. W. Harper, and D. MacQueen. The Definition of Standard ML (Revised). MIT Press, Cambridge, Massachusetts, 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Neubauer, P. Thiemann, M. Gasbichler, and M. Sperber. A Functional Notation for Functional Dependencies. In Proceedings of 2001 Haskell Workshop, pages 101--120, Florence, Italy, September 2001.]]Google ScholarGoogle Scholar
  16. A. Ohori and K. Kato. Semantics for communication primitives in a polymorphic language. In Conference Record of the Twentieth Annual ACM SIGPLAN Symposium on Principles of Programming Languages, pages 99--112, Charleston, SC, January 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S. Peyton Jones et al. Haskell~98 -- A non-strict, purely functional language. Available at http://www.haskell.org/onlinereport/, Feb. 1999.]]Google ScholarGoogle Scholar
  18. F. Pfenning. Computation and Deduction. Cambridge University Press, 2002.]]Google ScholarGoogle Scholar
  19. W. Taha and T. Sheard. MetaML and multi-stage programming with explicit annotations. Theoretical Computer Science, 248(1-2):211--242, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. Tolmach. Tag-free garbage collection using explicit type parameters. In Proceedings of ACM Conference on LISP and Functional Programming, pages 1--11, Orlando, FL, June 1994.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. V. Trifonov, B. Saha, and Z. Shao. Fully Reflexive Intensional Type Analysis. In Proceedings of the International Conference on Functional Programming, September 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. S. Weirich. Encoding intensional type analysis. In D. Sands, editor, Programming Languages and Systems: 10th European Symposium on Programming, ESOP 2001 Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2001 Genova, Italy, April 2--6, 2001, volume 2028 of Lecture Notes in Computer Science, pages 92--106. Springer, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. H. Xi. Dependent Types in Practical Programming. PhD thesis, Carnegie Mellon University, 1998. pp. viii+189. Available at http://www.cs.cmu.edu/char126hwxi/DML/thesis.ps.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. H. Xi, C. Chen, and G. Chen. Guarded Recursive Datatype Constructors, 2002. Available at http://www.cs.bu.edu/char126hwxi/GRecTypecon/.]]Google ScholarGoogle Scholar
  25. H. Xi and F. Pfenning. Dependent types in practical programming. In Proceedings of ACM SIGPLAN Symposium on Principles of Programming Languages, pages 214--227, San Antonio, Texas, January 1999.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Guarded recursive datatype constructors

      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
        POPL '03: Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
        January 2003
        308 pages
        ISBN:1581136285
        DOI:10.1145/604131
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 38, Issue 1
          January 2003
          298 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/640128
          Issue’s Table of Contents

        Copyright © 2003 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: 15 January 2003

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        POPL '03 Paper Acceptance Rate24of126submissions,19%Overall Acceptance Rate824of4,130submissions,20%

        Upcoming Conference

        POPL '25

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader