Abstract

Intermediate data structures are widely used in functional programs. Programs which use these intermediate structures are usually a lot easier to understand, but they result in loss of efficiency at run time. In order to reduce these run-time costs, a transformation algorithm called deforestation was proposed by Wadler which could eliminate intermediate structures. However, this algorithm is only applicable to a subset of all first-order functional terms. In this paper, it is shown how deforestation can be extended to be made applicable to all first-order functional terms. This is achieved by performing static analysis to determine which intermediate data structures can be eliminated. Using this extended form of deforestation, the majority of garbage which can be detected at compile-time will not be generated at run-time.KeywordsPattern MatchTransformation RuleFunction CallFunction DefinitionGarbage CollectionThese keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call