| | |
Summary: Static Type Inference in a Dynamically Typed Language
Alexander Aiken
IBM Almaden Research Center
650 Harry Rd.
San Jose, CA 95120
email: aiken@ibm.com
Brian R. Murphy
Computer Science Department
Stanford University
Stanford, CA 94305
email: brm@neon.stanford.edu
Abstract
We present a type inference system for FL based on an operational, rather than a denotational, formulation
of types. The essential elements of the system are a type language based on regular trees and a type inference
logic that implements an abstract interpretation of the operational semantics of FL. We use a nonstandard
approach to type inference because our requirements---using type information in the optimization of functional
programs---differ substantially from those of other type systems.
1 Introduction
Compilers derive at least two benefits from static type inference: the ability to detect and report potential runtime
errors at compiletime, and the use of type information in program optimization. Traditionally, type systems have
|