Partial type inference for untyped functional programs

  • Authors:
  • Carsten K. Gomard

  • Affiliations:
  • DIKU, Department of Computer Science, University of Copenhagen, Universitetsparken 1, DK - 2100 Copenhagen ø, Denmark

  • Venue:
  • LFP '90 Proceedings of the 1990 ACM conference on LISP and functional programming
  • Year:
  • 1990

Quantified Score

Hi-index 0.00

Visualization

Abstract

This extended abstract describes a way of inferring as much type information as possible about programs written in an untyped programming language. We present an algorithm that underlines the untypable parts of a program and assigns types to the rest. The algorithm is derived in a very simple manner from the well-known algorithm W of Damas & Milner [Damas and Milner 1982].Our algorithm provides us with an easy solution to the problem of doing binding time analysis of the untyped higher order lambda calculus, and thereby of the wide range of programming languages based upon the lambda calculus. The techniques can also be used to eliminate superfluous runtime type checking in untyped functional languages, to produce better error messages from type analyzers for strongly typed languages, and to analyze feasibility of arity raising.