Higher Order Demand Propagation

Dirk Pape
Institut für Informatik
Freie Universität Berlin
email: pape@inf.fu-berlin.de

Report B 98-15
Oktober 1998

In this report a new backward strictness analysis for functional languages is presented. It is called higher order demand propagation and is applicable to a realistic non-strict functional language, which has a polymorphic type system and supports higher order functions and user definable algebraic data types. This report defines a semantics for higher order demand propagation and relates it to the standard semantics of the functional language. Each definition in a program is mapped to a demand propagator, which is a higher order function, that propagates context demands to function arguments. The strictness information deduced by the analysis is very accurate, because demands can actually be constructed during the analysis. These demands conform better to the analysed functions than abstract values, which are constructed alone with respect to the type information like in other existing strictness analyses. The richness of the semantic domains of higher order demand propagation makes it possible to express generalised strictness information for higher order functions even across module boundaries. An approach to integrate the higher order demand propagation analysis into an existing compiler for a lazy functional language is sketched at the end of the report.

Get the report here or by anonymous ftp:
Server: ftp.inf.fu-berlin.de
File:   pub/reports/tr-b-98-15.ps.gz
 
Or get/view the Acrobat pdf version (recommended)