Sciweavers

PPDP
2005
Springer

Automatic type inference via partial evaluation

14 years 4 months ago
Automatic type inference via partial evaluation
Type checking and type inference are fundamentally similar problems. However, the algorithms for performing the two operations, on the same type system, often differ significantly. The type checker is typically a straightforward encoding of the original type rules. For many systems, type inference is performed using a two-phase, constraint-based algorithm. We present an approach that, given the original type rules written as clauses in a logic programming language, automatically generates an efficient, two-phase, constraint-based type inference algorithm. Our approach works by partially evaluating the type checking rules with respect to the target program to yield a set of constraints suitable for input to an external constraint solver. This approach avoids the need to manually develop and verify a separate type inference algorithm, and is ideal for experimentation with and rapid prototyping of novel type systems. Categories and Subject Descriptors
Aaron Tomb, Cormac Flanagan
Added 28 Jun 2010
Updated 28 Jun 2010
Type Conference
Year 2005
Where PPDP
Authors Aaron Tomb, Cormac Flanagan
Comments (0)