Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Intersection types and computational effects

Published: 01 September 2000 Publication 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]
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.
[2]
V. Breazu-Tannen, T. Coquand, C. Gunter, and A. Scedrov. Inheritance as implicit coercion. Information and Computation, 93:172-221, 1991.
[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.
[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.
[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
[6]
T. Freeman. Renement Types for ML. PhD thesis, Carnegie-Mellon University, Mar. 1994. Available as technical report CMU-CS-94-110.
[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.
[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.
[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.
[10]
R. Milner, M. Tofte, R. Harper, and D. MacQueen. The Definition of Standard ML(Revised). MIT Press, 1997.
[11]
J. C. Mitchell. Polymorphic type inference and containment. Information and Computation, 76(2/3):211{249, 1988.
[12]
B. C. Pierce. Intersection types and bounded polymorphism. Mathematical Structures in Computer Science, 7(2):129-193, Apr. 1997.
[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.
[14]
J. C. Reynolds. Preliminary design of the programming language Forsythe. Technical Report CMU-CS-88-159, Carnegie Mellon University, Pittsburgh, Pennsylvania, June 1988.
[15]
J. C. Reynolds. Design of the programming language Forsythe. Technical Report CMU-CS-96-146, Carnegie Mellon University, Pittsburgh, Pennsylvania, June 1996.
[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.
[17]
M. Tofte. Type inference for polymorphic references. Information and Computation, 89:1-34, November 1990.
[18]
J. B. Wells. The undecidability ofMitchell's subtyping relation. Technical Report 95-019, Boston University, Boston, Massachusetts, December 1995.
[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.
[20]
A. K. Wright. Simple imperative polymorphism. Information and Computation, 8:343-55, 1995.
[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.
[22]
A. K. Wright and M. Felleisen. A syntactic approach to type soundness. Information and Computation, 115:38-94, 1994.

Cited By

View all
  • (2023)From semantics to types: The case of the imperative λ-calculusTheoretical Computer Science10.1016/j.tcs.2023.114082973(114082)Online publication date: Sep-2023
  • (2022)Applicative Intersection TypesProgramming Languages and Systems10.1007/978-3-031-21037-2_8(155-174)Online publication date: 25-Nov-2022
  • (2021)Distributing intersection and union types with splits and duality (functional pearl)Proceedings of the ACM on Programming Languages10.1145/34735945:ICFP(1-24)Online publication date: 22-Aug-2021
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 35, Issue 9
Sept. 2000
291 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/357766
Issue’s Table of Contents
  • cover image ACM Conferences
    ICFP '00: Proceedings of the fifth ACM SIGPLAN international conference on Functional programming
    September 2000
    294 pages
    ISBN:1581132026
    DOI:10.1145/351240
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: 01 September 2000
Published in SIGPLAN Volume 35, Issue 9

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)173
  • Downloads (Last 6 weeks)31
Reflects downloads up to 30 Aug 2024

Other Metrics

Citations

Cited By

View all
  • (2023)From semantics to types: The case of the imperative λ-calculusTheoretical Computer Science10.1016/j.tcs.2023.114082973(114082)Online publication date: Sep-2023
  • (2022)Applicative Intersection TypesProgramming Languages and Systems10.1007/978-3-031-21037-2_8(155-174)Online publication date: 25-Nov-2022
  • (2021)Distributing intersection and union types with splits and duality (functional pearl)Proceedings of the ACM on Programming Languages10.1145/34735945:ICFP(1-24)Online publication date: 22-Aug-2021
  • (2020)Resolution as intersection subtyping via Modus PonensProceedings of the ACM on Programming Languages10.1145/34282744:OOPSLA(1-30)Online publication date: 13-Nov-2020
  • (2019)Sound and complete bidirectional typechecking for higher-rank polymorphism with existentials and indexed typesProceedings of the ACM on Programming Languages10.1145/32903223:POPL(1-28)Online publication date: 2-Jan-2019
  • (2019)Intersection Types in Java: Back to the FutureModels, Mindsets, Meta: The What, the How, and the Why Not?10.1007/978-3-030-22348-9_6(68-86)Online publication date: 26-Jun-2019
  • (2017)Sums of uncertainty: refinements go gradualACM SIGPLAN Notices10.1145/3093333.300986552:1(804-817)Online publication date: 1-Jan-2017
  • (2017)Sums of uncertainty: refinements go gradualProceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages10.1145/3009837.3009865(804-817)Online publication date: 1-Jan-2017
  • (2017)Extensible Datasort RefinementsProgramming Languages and Systems10.1007/978-3-662-54434-1_18(476-503)Online publication date: 19-Mar-2017
  • (2016)Program synthesis from polymorphic refinement typesACM SIGPLAN Notices10.1145/2980983.290809351:6(522-538)Online publication date: 2-Jun-2016
  • Show More Cited By

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media