Thunk-lifting: Reducing heap usage in an implementation of a lazy functional language

A.R. Haydarlou, Pieter H. Hartel

    Research output: Contribution to journalArticleAcademicpeer-review

    21 Downloads (Pure)


    Thunk-lifting is a programtransformation for lazy functional programs. The transforma- tion aims at reducing the amount of heap space allocated to the program when it executes. Thunk-lifting transforms a function application that contains as arguments further, nested, function applications into a new function application without nesting. The transformation thus essentially folds some function applications. The applications to be folded are selected on the basis of a set of conditions, which have been chosen such that thunk-lifting never increases the amount of heap space required by a transformed program. Thunk-lifting has been implemented and applied to a number ofmediumsize benchmark programs. The results show that the number of cell claims in the heap decreases on average by 5%, with a maximum of 16%.
    Original languageUndefined
    JournalJournal of functional programming
    Issue number1
    Publication statusPublished - Aug 1995


    • IR-55714
    • EWI-1144

    Cite this