Shrinking lambda expressions in linear time
Andrew W. Appel, Trevor Jim · Journal of Functional Programming · 1997
Functional-language compilers often perform optimizations based on beta and delta reduction. To avoid speculative optimizations that can blow up the code size, we might wish to use only shrinking reduction rules guaranteed to make the program smaller: these include dead-variable elimination, constant folding, and a restricted beta rule that inlines only functions that are called just once. The restricted beta rule leads to a shrinking rewrite system that has not previously been studied. We show some efficient normalization algorithms that are immediately useful in optimizing compilers; and we give a confluence proof for our system, showing that the choice of normalization algorithm does not affect final code quality.
Cited by 60 works. doi:10.1017/s0956796897002839 Open-access PDF
Authors
References
- The Lambda Calculus - Its Syntax and Semantics
- Rabbit: A Compiler for Scheme
- Compiling with Continuations
- ORBIT: an optimizing compiler for scheme
- Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine
- The essence of compiling with continuations
- Continuation-passing, closure-passing style
- Space-efficient closure representations
- The essence of compiling with continuations
- Design and Implementation of Code Optimizations for a Type-Directed Compiler for Standard ML.