10.1145/351240.351259acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article
Free Access

Intersection types and computational effects

Authors Info & Claims
Online:01 September 2000Publication History

ABSTRACT

We show that standard formulations of intersection type systems are unsound in the presence of computational effects, and propose a solution similar to the value restriction for polymorphism adopted in the revised definition of Standard ML. It differs in that it is not tied to let-expressions and requires an additional weakening of the usual subtyping rules. We also present a bi-directional type-checking algorithm for the resulting language that does not require an excessive amount of type annotations and illustrate it through some examples. We further show that the type assignment system can be extended to incorporate parametric polymorphism. Taken together, we see our system and associated type-checking algorithm as a significant step towards the introduction of intersection types into realistic programming languages. The added expressive power would allow many more properties of programs to be stated by the programmer and statically verified by a compiler.

References

  1. 1.A. Aiken, E. Wimmers, and T. K. Lakshman. Soft typing with conditional types. In Twenty-First ACM Symposium on Principles of Programming Languages (POPL'94), pages 163-173, Portland, Oregon, Jan. 1994. Google ScholarGoogle Scholar
  2. 2.V. Breazu-Tannen, T. Coquand, C. Gunter, and A. Scedrov. Inheritance as implicit coercion. Information and Computation, 93:172-221, 1991. Google ScholarGoogle Scholar
  3. 3.L. Cardelli. Type systems. In A. B. Tucker, Jr., editor, The Handbook of Computer Science and Engineering, chapter 103, pages 2208-2236. CRC Press, 1997.Google ScholarGoogle Scholar
  4. 4.R. Davies. A practical renement-type checker for Standard ML. In M. Johnson, editor, Algebraic Methodology and Software Technology Sixth International Conference (AMAST'97), pages 565-566, Sydney, Australia, Dec. 1997. Springer-Verlag LNCS 1349. Google ScholarGoogle Scholar
  5. 5.R. Davies. Practical renement-type checking. Thesis Proposal, Carnegie Mellon University Computer Science Department, Nov. 1997. http://www.cs.cmu.edu/~rowan/papers/proposal.ps Google ScholarGoogle Scholar
  6. 6.T. Freeman. Renement Types for ML. PhD thesis, Carnegie-Mellon University, Mar. 1994. Available as technical report CMU-CS-94-110. Google ScholarGoogle Scholar
  7. 7.T. Freeman and F. Pfenning. Renement types for ML. In Proceedings of the SIGPLAN '91 Symposium on Language Design and Implementation, Toronto, Ontario, pages 268-277. ACM Press, June 1991. Google ScholarGoogle Scholar
  8. 8.R. Harper and C. Stone. A type-theoretic interpretation of Standard ML. In G. Plotkin, C. Stirling, and M. Tofte, editors, Proof, Language, and Interaction: Essays in Honour of Robin Milner. MIT Press, 2000. Google ScholarGoogle Scholar
  9. 9.X. Leroy. Polymorphism by name. In Twentieth ACM Symposium on Principles of Programming Languages (POPL'93), pages 220-231, Charleston, South Carolina, January 1993. Google ScholarGoogle Scholar
  10. 10.R. Milner, M. Tofte, R. Harper, and D. MacQueen. The Definition of Standard ML(Revised). MIT Press, 1997. Google ScholarGoogle Scholar
  11. 11.J. C. Mitchell. Polymorphic type inference and containment. Information and Computation, 76(2/3):211{249, 1988. Google ScholarGoogle Scholar
  12. 12.B. C. Pierce. Intersection types and bounded polymorphism. Mathematical Structures in Computer Science, 7(2):129-193, Apr. 1997. Google ScholarGoogle Scholar
  13. 13.B. C. Pierce and D. N. Turner. Local type inference. In The 25th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL'98), pages 252-265, San Diego, California, 1998. Google ScholarGoogle Scholar
  14. 14.J. C. Reynolds. Preliminary design of the programming language Forsythe. Technical Report CMU-CS-88-159, Carnegie Mellon University, Pittsburgh, Pennsylvania, June 1988.Google ScholarGoogle Scholar
  15. 15.J. C. Reynolds. Design of the programming language Forsythe. Technical Report CMU-CS-96-146, Carnegie Mellon University, Pittsburgh, Pennsylvania, June 1996.Google ScholarGoogle Scholar
  16. 16.J. Tiuryn and P. Urzyczyn. The subtyping problem for second-order types is undecidable. In Proceedings, 11thAnnual IEEE Symposium on Logic in Computer Science, pages 74-85, New Brunswick, New Jersey, 27-30 July 1996. IEEE Computer Society Press. Google ScholarGoogle Scholar
  17. 17.M. Tofte. Type inference for polymorphic references. Information and Computation, 89:1-34, November 1990. Google ScholarGoogle Scholar
  18. 18.J. B. Wells. The undecidability ofMitchell's subtyping relation. Technical Report 95-019, Boston University, Boston, Massachusetts, December 1995.Google ScholarGoogle Scholar
  19. 19.J. B. Wells, A. Dimock, R. Muller, and F. Turbak. A typed intermediate language for ow-directed compilation. In TAPSOFT'97: Theory and Practice of Software Development, Proc. 7th International Joint Conference CAAP/FASE, pages 757-771, Lille, France, Apr. 1997. Springer-Verlag LNCS 1214. Google ScholarGoogle Scholar
  20. 20.A. K. Wright. Simple imperative polymorphism. Information and Computation, 8:343-55, 1995. Google ScholarGoogle Scholar
  21. 21.A. K. Wright and R. Cartwright. A practical soft type system for Scheme. In Proceedings of the 1994 ACM Conference on LISP and Functional Programming, pages 250-262, Orlando, Florida, June 1994. Google ScholarGoogle Scholar
  22. 22.A. K. Wright and M. Felleisen. A syntactic approach to type soundness. Information and Computation, 115:38-94, 1994. Google ScholarGoogle Scholar

Index Terms

  1. Intersection types and computational effects

    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

      ACM Conferences cover image
      ICFP '00: Proceedings of the fifth ACM SIGPLAN international conference on Functional programming
      September 2000
      294 pages
      ISBN:1581132026
      DOI:10.1145/351240

      Copyright © 2000 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Online: 1 September 2000

      Permissions

      Request permissions about this article.

      Request Permissions

      Qualifiers

      • Article

      Acceptance Rates

      ICFP '00 Paper Acceptance Rate 24 of 110 submissions, 22%
      Overall Acceptance Rate 305 of 979 submissions, 31%

      Upcoming Conference

      ICFP '22

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!