Uppsala University Department of Information Technology

Technical Report 2003-045

A Polyvariant Type Analysis for Erlang

Sven-Olof Nyström

September 2003

Abstract:
This paper presents a type analysis for the programming language Erlang. The analysis computes interprocedural control-flow and data-flow information, and should be applicable to any higher-order functional programming language with call-by-value semantics. The analysis uses a novel method for polyvariance, static limiting, where an approximation of the call graph is analyzed to determine whether a function should be treated as polyvariant or monovariant. A general framework for polyvariant analysis is presented. This framework is used for experimental investigations to evaluate the cost and potential benefits of polyvariant analysis and to compare different approaches to polyvariant analysis. The experimental results show that static limiting gives the same or better precision as the other polyvariant analyses, while having more predictable analysis times. However, the experiments show only small improvements in precision for the various polyvariant analyses.

Available as PDF (217 kB, no cover)

Download BibTeX entry.



Uppsala Universitet