The under-performing unfold: a new approach to optimising corecursive programs

This paper presents a new approach to optimising corecursive programs by factorisation. In particular, we focus on programs written using the corecursion operator unfold. We use and expand upon the proof techniques of guarded coinduction and unfold fusion, capturing a pattern of generalising coinduc...

Full description

Bibliographic Details
Main Authors: Hackett, Jennifer, Hutton, Graham, Jaskelioff, Mauro
Format: Conference or Workshop Item
Published: 2013
Subjects:
Online Access:https://eprints.nottingham.ac.uk/28183/
Description
Summary:This paper presents a new approach to optimising corecursive programs by factorisation. In particular, we focus on programs written using the corecursion operator unfold. We use and expand upon the proof techniques of guarded coinduction and unfold fusion, capturing a pattern of generalising coinductive hypotheses by means of abstraction and representation functions. The pattern we observe is simple, has not been observed before, and is widely applicable. We develop a general program factorisation theorem from this pattern, demonstrating its utility with a range of practical examples.