A higher-order removal method |
| |
Authors: | Wei-Ngan Chin John Darlington |
| |
Affiliation: | 1. Department of Information Systems & Computer Science, National University of Singapore, Singapore 2. Department of Computing, Imperial College of Science, Technology & Medicine, UK
|
| |
Abstract: | A major attraction of functional languages is their support for higher-order functions. This facility increases the expressive power of functional languages by allowing concise and reusable programs to be written. However, higher-order functions are more expensive to execute and to analyse for optimisations. To reduce the performance penalties of using higher-order functions, this paper proposes two transformation algorithms which could automatically removemost higher-order functions from functional programs. The first algorithm uses aneta-expansion technique to eliminate expressions which return function-type results. The second algorithm uses afunction specialisation technique to eliminate expressions with function-type arguments. Together, they remove higher-order functions by transforming each higher-order program to an equivalent first-order (or lower-order) program. We shall prove that the two algorithms areterminating (when applied to well-typed programs) and alsototally-correct (preserving non-strict semantics). |
| |
Keywords: | |
本文献已被 SpringerLink 等数据库收录! |
|