School of Computing

Deforestation of Functional Programs through Type Inference

Olaf Chitil

In Wolfgang Goerigk, editor, 17 Workshops der GI-Fachgruppe 2.1.4. Programmiersprachen und Rechenkonzepte mit Schwerpunkt Softwarecomponenten, pages 182-196. Bad Honnef, Bericht Nr. 2007 des Instituts fur Informatik und Praktische Mathematik der Christian-Albrechts-Universitat zu Kiel, July 2000.

Abstract

Deforestation optimises a functional program by transforming it into another one that does not create certain intermediate data structures. Short cut deforestation is a deforestation method which is based on a single, local transformation rule. In return, short cut deforestation expects both producer and consumer of the intermediate structure in a certain form. Starting from the fact that short cut deforestation is based on a parametricity theorem of the second-order typed lambda-calculus, we show how the required form of a list producer can be derived through the use of type inference. Type inference can also indicates which function definitions need to be inlined. Because only limited inlining across module boundaries is practically feasible, we develop a scheme for splitting a function definition into a worker definition and a wrapper definition. For deforestation we only need to inline the small wrapper definition.

Download publication 172 kbytes (PDF)

Bibtex Record

@inproceedings{1900,
author = {Olaf Chitil},
title = {{Deforestation of Functional Programs through Type Inference}},
month = {July},
year = {2000},
pages = {182-196},
keywords = {determinacy analysis, Craig interpolants},
note = {},
doi = {},
url = {http://www.cs.kent.ac.uk/pubs/2000/1900},
    publication_type = {inproceedings},
    submission_id = {19890_1083662857},
    booktitle = {17 Workshops der GI-Fachgruppe 2.1.4. Programmiersprachen und Rechenkonzepte mit Schwerpunkt Softwarecomponenten},
    editor = {Wolfgang Goerigk},
    organization = {Bad Honnef, Bericht Nr. 2007 des Instituts fur Informatik und Praktische Mathematik der Christian-Albrechts-Universitat zu Kiel},
}

School of Computing, University of Kent, Canterbury, Kent, CT2 7NF

Enquiries: +44 (0)1227 824180 or contact us.

Last Updated: 21/03/2014