Incremental Inference of Partial Types
We present a type inference procedure with partial types for a λ-calculus equipped withda tatypes. Our procedure handles a type language containing greatest and least types (ω and ⊥ respectively), recursive types, subtyping, and datatypes (yielding constants at the level of terms). The main feature of our algorithm is incrementality; this allows us to progressively analyse successive de.nitions, which is of interest in the setting of a system like the CuCh machine (developed at the University of Rome). The methods we describe have led to an implementation; we illustrate its use on a few examples.
KeywordsType Variable Partial Type Type Scheme Type Inference Type Constraint
Unable to display preview. Download preview PDF.
- [AK95]Z. M. Ariola and J. W. Klop. Equational term graphrewrit ing. Technical report, University of Oregon, 1995.Google Scholar
- [AS85]H. Abelson and G. J. Susman. Structure and Interpretation of Computer Programs. MIT Press, 1985.Google Scholar
- [BPG94]C. Böhm, A. Piperno, and S. Guerrini. Lambda-definition of Function(al)s by Normal Forms. In Proc. of ESOP’94, volume 788 of LNCS, pages 135–154. Springer Verlag, 1994.Google Scholar
- [CC90]F. Cardone and M. Coppo. Two Extensions of Curry’s Inference System. In P. Odifreddi, editor, Logic and Computer Science, pages 19–75. Accademic Press, 1990.Google Scholar
- [Gom90]C. Gomard. Partial Type Inference for Untyped Functional Programs. In Proceedings of the ACM Conference on Lisp and Functional Programming, pages 282–287, 1990.Google Scholar
- [Jim96]T. Jim. What are principal typings and what are they good for? In POPL’96, pages 42–53. ACM, 1996.Google Scholar
- [WO92]Mitchell Wand and Patrick M. O’Keefe. Type inference for partial types is decidable. In B. Krieg-Brückner, editor, European Symposium on Programming’ 92, volume 582 of LNCS, pages 408–417. Springer Verlag, 1992.Google Scholar