Advertisement

System E: Expansion Variables for Flexible Typing with Linear and Non-linear Types and Intersection Types

  • Sébastien Carlier
  • Jeff Polakow
  • J. B. Wells
  • A. J. Kfoury
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2986)

Abstract

Types are often used to control and analyze computer programs. Intersection types give great flexibility, but have been difficult to implement. The ! operator, used to distinguish between linear and non-linear types, has good potential for better resource-usage tracking, but has not been as flexible as one might want and has been difficult to use in compositional analysis. We introduce System E, a type system with expansion variables, linear intersection types, and the ! type constructor for creating non-linear types. System E is designed for maximum flexibility in automatic type inference and for ease of automatic manipulation of type information. Expansion variables allow postponing the choice of which typing rules to use until later constraint solving gives enough information to allow making a good choice. System E removes many difficulties that expansion variables had in the earlier System I and extends expansion variables to work with ! in addition to the intersection type constructor. We present subject reduction for call-by-need evaluation and discuss program analysis in System E.

Keywords

Type System Intersection Type Typing Rule Type Inference Type Environment 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

References

  1. 1.
    Ariola, Z.M., Felleisen, M., Maraist, J., Odersky, M., Wadler, P.: The call-by-need lambda calculus. In: Conf. Rec. 22nd Ann. ACM Symp. Princ. of Prog. Langs. (1995)Google Scholar
  2. 2.
    Barendregt, H., Coppo, M., Dezani-Ciancaglini, M.: A filter lambda model and the completeness of type assignment. J. Symbolic Logic 48(4) (1983)Google Scholar
  3. 3.
    Carlier, S.: Polar type inference with intersection types and ω. In: Proceedings of the 2nd Workshop on Intersection Types and Related Systems, The ITRS 2002 proceedings. Elec. Notes in Theoret. Comp. Sci., vol. 70(1) (2002)Google Scholar
  4. 4.
    Coppo, M., Dezani-Ciancaglini, M., Venneri, B.: Principal type schemes and λ- calculus semantics. In: Hindley, J.R., Seldin, J.P. (eds.) To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism. Academic Press, London (1980)Google Scholar
  5. 5.
    Damas, L., Milner, R.: Principal type schemes for functional programs. In: Conf. Rec. 9th Ann. ACM Symp. Princ. of Prog. Langs. (1982)Google Scholar
  6. 6.
    Girard, J.-Y.: Interprétation Fonctionnelle et Elimination des Coupures de l’Arithmétique d’Ordre Supérieur. Thèse d’Etat, Université de Paris VII (1972)Google Scholar
  7. 7.
    Jim, T.: What are principal typings and what are they good for? In: Conf. Rec. POPL 1996: 23rd ACM Symp. Princ. of Prog. Langs. (1996)Google Scholar
  8. 8.
    Kfoury, J., Wells, J.B.: Principality and decidable type inference for finite-rank intersection types. In: POPL 1999 [14]. Superseded by [10] (1999)Google Scholar
  9. 9.
    Kfoury, J., Wells, J.B.: Principality and type inference for intersection types using expansion variables. Supersedes [8] (2003)Google Scholar
  10. 10.
    Kfoury, J., Wells, J.B.: Principality and type inference for intersection types using expansion variables. Theoret. Comput. Sci. 200X (to appear). Supersedes [8]. For omitted proofs, see the longer report [9]Google Scholar
  11. 11.
    Kobayashi, N.: Quasi-linear types. In: POPL 1999 [14] (1999)Google Scholar
  12. 12.
    Milner, R.: A theory of type polymorphism in programming. J. Comput. System Sci. 17 (1978)Google Scholar
  13. 13.
    Mitchell, J.C., Plotkin, G.D.: Abstract types have existential type. ACM Trans. on Prog. Langs. & Systs. 10(3) (1988)Google Scholar
  14. 14.
    Conf. Rec. POPL 1999: 26th ACM Symp. Princ. of Prog. Langs. (1999)Google Scholar
  15. 15.
    Reynolds, J.C.: Towards a theory of type structure. In: Robinet, B. (ed.) Programming Symposium. LNCS, vol. 19. Springer, Heidelberg (1974)Google Scholar
  16. 16.
    Turner, D.N., Wadler, P.: Operational interpretations of linear logic. Theoret. Comput. Sci. 227(1-2) (1999)Google Scholar
  17. 17.
    Turner, D.N., Wadler, P., Mossin, C.: Once upon a type. In: 7th International Conference on Functional Programming and Computer Architecture, San Diego, California (1995)Google Scholar
  18. 18.
    van Bakel, S.J.: Intersection type assignment systems. Theoret. Comput. Sci. 151(2) (1995)Google Scholar
  19. 19.
    Wadler, P.: Linear types can change the world. In: Broy, M., Jones, C.B. (eds.) IFIP TC 2 Working Conference on Programming Concepts and Methods (1990)Google Scholar
  20. 20.
    Wadler, P.: Is there a use for linear logic? In: Partial Evaluation and Semantics- Based Program Manipulation (PEPM). ACM Press, New York (1991)Google Scholar
  21. 21.
    Wansbrough, K., Jones, S.P.: Once upon a polymorphic type. In: POPL 1999 [14] (1999)Google Scholar
  22. 22.
    Wells, J.B.: The essence of principal typings. In: Widmayer, P., Triguero, F., Morales, R., Hennessy, M., Eidenbenz, S., Conejo, R. (eds.) ICALP 2002. LNCS, vol. 2380, p. 913. Springer, Heidelberg (2002)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2004

Authors and Affiliations

  • Sébastien Carlier
    • 1
  • Jeff Polakow
    • 1
  • J. B. Wells
    • 1
  • A. J. Kfoury
    • 2
  1. 1.Heriot-Watt University 
  2. 2.Boston University 

Personalised recommendations