Principality and type inference for intersection types using expansion variables

نویسندگان

  • Assaf J. Kfoury
  • Joe B. Wells
چکیده

Principality of typings is the property that for each typable term, there is a typing from which all other typings are obtained via some set of operations. Type inference is the problem of finding a typing for a given term, if possible. We define an intersection type system which has principal typings and types exactly the strongly normalizable λ-terms. More interestingly, every finite-rank restriction of this system (using Leivant’s first notion of rank) has principal typings and also has decidable type inference. This is in contrast to System F where the finite rank restriction for every finite rank at 3 and above has neither principal typings nor decidable type inference. Furthermore, the notion of principal typings for our system involves only one operation, substitution, rather than several operations (not all substitutionbased) as in earlier presentations of principality for intersection types (without rank restrictions). In our system the earlier notion of expansion is integrated in the form of expansion variables, which are subject to substitution as are ordinary variables. A unification-based type inference algorithm is presented using a new form of unification, β-unification. This is an expanded version of a report that appeared in the Proceedings of the 1999 ACM Symposium on Principles of Programming Languages, under the title “Principality and Decidable Type Inference for Finite-Rank Intersection Types” [KW99]. This work has been partly supported by EPSRC grants GR/L 36963 and GR/R 41545/01, by NATO grant CRG 971607, by NSF grants 9417382 (CCR), 9806745 (EIA), 9988529 (CCR), 0113193 (ITR), and by Sun Microsystems equipment grant EDUD-7826-990410-US.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Expansion: the Crucial Mechanism for Type Inference with Intersection Types: A Survey and Explanation

The operation of expansion on typings was introduced at the end of the 1970s by Coppo, Dezani, and Venneri for reasoning about the possible typings of a term when using intersection types. Until recently, it has remained somewhat mysterious and unfamiliar, even though it is essential for carrying out compositional type inference. The fundamental idea of expansion is to be able to calculate the ...

متن کامل

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

Types are often used to control and analyze computer programs. Intersection types give a type system great flexibility, but have been difficult to implement. The ! operator, used to distinguish between linear and non-linear types, has good potential for improving tracking of resource usage, but has not been as flexible as one might want and has been difficult to use in compositional analysis. W...

متن کامل

Expansion for Universal Quantifiers

Expansion is an operation on typings (i.e., pairs of typing environments and result types) defined originally in type systems for the λ-calculus with intersection types in order to obtain principal (i.e., most informative, strongest) typings. In a type inference scenario, expansion allows postponing choices for whether and how to use non-syntax-driven typing rules (e.g., intersection introducti...

متن کامل

Expansion: the Crucial Mechanism for Type Inference with Intersection Types: Survey and Explanation

The operation of expansion on typings was introduced at the end of the 1970s by Coppo, Dezani, and Venneri for reasoning about the possible typings of a term when using intersection types. Until recently, it has remained somewhat mysterious and unfamiliar, even though it is essential for carrying out compositional type inference. The fundamental idea of expansion is to be able to calculate the ...

متن کامل

Unification with Expansion Variables: Preliminary Results and Problems

Expansion generalises substitution. An expansion is a special term whose leaves can be substitutions. Substitutions map term variables to ordinary terms and expansion variables to expansions. Expansions (resp., ordinary terms) may contain expansion variables, each applied to an argument expansion (resp., ordinary term). Instances of the unification problem in this setting are constraint sets, w...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Theor. Comput. Sci.

دوره 311  شماره 

صفحات  -

تاریخ انتشار 2004