|
ABSTRACT
System E is a recently designed type system for the λ-calculus with intersection types and expansion variables. During automatic type inference, expansion variables allow postponing decisions about which non-syntax-driven typing rules to use until the right information is available and allow implementing the choices via substitution.This paper uses expansion variables in a unification-based automatic type inference algorithm for System~E that succeeds for every β-normalizable λ-term. We have implemented and tested our algorithm and released our implementation publicly. Each step of our unification algorithm corresponds to exactly one β-reduction step, and vice versa. This formally verifies and makes precise a step-for-step correspondence between type inference and β-reduction. This also shows that type inference with intersection types and expansion variables can, in effect, carry out an arbitrary amount of partial evaluation of the program being analyzed.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
 |
1
|
|
| |
2
|
H. Barendregt, M. Coppo, M. Dezani-Ciancaglini. A filter lambda model and the completeness of type assignment. J. Symbolic Logic, 48(4), 1983.
|
| |
3
|
H. P. Barendregt. The Lambda Calculus: Its Syntax and Semantics. North-Holland, revised edition, 1984.
|
| |
4
|
G. Boudol, P. Zimmer. On type inference in the intersection type discipline. Draft available from 1st author's web page, 2004.
|
| |
5
|
S. Carlier, J. Polakow. System E experimentation tool. http://www.macs.hw.ac.uk/ultra/compositional-analysis/system-E.
|
| |
6
|
S. Carlier, J. Polakow, J. B. Wells, A. J. Kfoury. System E: Expansion variables for flexible typing with linear and non-linear types and intersection types. In Programming Languages & Systems, 13th European Symp. Programming, vol. 2986 of LNCS. Springer-Verlag, 2004.
|
| |
7
|
Mario Coppo , Ferruccio Damiani , Paola Giannini, Strictness, totality, and non-standard-type inference, Theoretical Computer Science, v.272 n.1-2, p.69-112, February 6, 2002
[doi> 10.1016/S0304-3975(00)00348-0]
|
| |
8
|
M. Coppo, M. Dezani-Ciancaglini. An extension of the basic functionality theory for the λ-calculus. Notre Dame J. Formal Logic, 21(4), 1980.
|
| |
9
|
M. Coppo, M. Dezani-Ciancaglini, B. Venneri. Principal type schemes and λ-calculus semantics. In Hindley and Seldin {17}.
|
| |
10
|
|
 |
11
|
|
 |
12
|
|
| |
13
|
|
| |
14
|
|
| |
15
|
C. Haack, J. B. Wells. Type error slicing in implicitly-typed higher-order languages. In Programming Languages & Systems, 12th European Symp. Programming, vol. 2618 of LNCS. Springer-Verlag, 2003. Superseded by {16}.
|
| |
16
|
|
| |
17
|
J. R. Hindley, J. P. Seldin, eds. To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism. Academic Press, 1980.
|
 |
18
|
|
 |
19
|
|
 |
20
|
|
| |
21
|
A. J. Kfoury, J. B. Wells. Principality and type inference for intersection types using expansion variables. Supersedes {20}, 2003.
|
| |
22
|
|
 |
23
|
|
| |
24
|
E. K. G. Lopez-Escobar. Proof-functional connectives. In C. Di Prisco, ed., Methods of Mathematical Logic, Proceedings of the 6th Latin-American Symposium on Mathematical Logic, Caracas 1983, vol. 1130 of Lecture Notes in Mathematics. Springer-Verlag, 1985.
|
 |
25
|
|
| |
26
|
|
| |
27
|
R. Milner. A theory of type polymorphism in programming. J. Comput. System Sci., 17, 1978.
|
 |
28
|
Peter Møller Neergaard , Harry G. Mairson, Types, potency, and idempotency: why nonlinearity and amnesia make a type system work, Proceedings of the ninth ACM SIGPLAN international conference on Functional programming, September 19-21, 2004, Snow Bird, UT, USA
|
| |
29
|
G. Pottinger. A type assignment for the strongly normalizable λ-terms. In Hindley and Seldin {17}.
|
| |
30
|
L. Regnier. Lambda calcul et réseaux. PhD thesis, University Paris 7, 1992.
|
| |
31
|
|
| |
32
|
S. Ronchi Della Rocca, B. Venneri. Principal type schemes for an extended type theory. Theoret. Comput. Sci., 28(1--2), 1984.
|
| |
33
|
É. Sayag, M. Mauny. A new presentation of the intersection type discipline through principal typings of normal forms. Technical Report RR-2998, INRIA, 1996.
|
| |
34
|
|
| |
35
|
S. J. van Bakel. Intersection Type Disciplines in Lambda Calculus and Applicative Term Rewriting Systems. PhD thesis, Catholic University of Nijmegen, 1993.
|
| |
36
|
|
| |
37
|
|
| |
38
|
|
| |
39
|
|
|