Work it, wrap it, fix it, fold it
The worker/wrapper transformation is a general-purpose technique for refactoring recursive programs to improve their performance. The two previous approaches to formalising the technique were based upon different recursion operators and different correctness conditions. In this paper we show how the...
| Main Authors: | , |
|---|---|
| Format: | Article |
| Published: |
Cambridge University Press
2014
|
| Online Access: | https://eprints.nottingham.ac.uk/28182/ |
| _version_ | 1848793520847978496 |
|---|---|
| author | Sculthorpe, Neil Hutton, Graham |
| author_facet | Sculthorpe, Neil Hutton, Graham |
| author_sort | Sculthorpe, Neil |
| building | Nottingham Research Data Repository |
| collection | Online Access |
| description | The worker/wrapper transformation is a general-purpose technique for refactoring recursive programs to improve their performance. The two previous approaches to formalising the technique were based upon different recursion operators and different correctness conditions. In this paper we show how these two approaches can be generalised in a uniform manner by combining their correctness conditions, extend the theory with new conditions that are both necessary and sufficient to ensure the correctness of the worker/wrapper technique, and explore the benefits that result. All the proofs have been mechanically verified using the Agda system. |
| first_indexed | 2025-11-14T19:01:37Z |
| format | Article |
| id | nottingham-28182 |
| institution | University of Nottingham Malaysia Campus |
| institution_category | Local University |
| last_indexed | 2025-11-14T19:01:37Z |
| publishDate | 2014 |
| publisher | Cambridge University Press |
| recordtype | eprints |
| repository_type | Digital Repository |
| spelling | nottingham-281822020-05-04T20:15:53Z https://eprints.nottingham.ac.uk/28182/ Work it, wrap it, fix it, fold it Sculthorpe, Neil Hutton, Graham The worker/wrapper transformation is a general-purpose technique for refactoring recursive programs to improve their performance. The two previous approaches to formalising the technique were based upon different recursion operators and different correctness conditions. In this paper we show how these two approaches can be generalised in a uniform manner by combining their correctness conditions, extend the theory with new conditions that are both necessary and sufficient to ensure the correctness of the worker/wrapper technique, and explore the benefits that result. All the proofs have been mechanically verified using the Agda system. Cambridge University Press 2014-01 Article PeerReviewed Sculthorpe, Neil and Hutton, Graham (2014) Work it, wrap it, fix it, fold it. Journal of Functional Programming, 24 (1). pp. 113-127. ISSN 0956-7968 http://journals.cambridge.org/action/displayAbstract?fromPage=online&aid=9239074&fileId=S0956796814000045 doi:10.1017/S0956796814000045 doi:10.1017/S0956796814000045 |
| spellingShingle | Sculthorpe, Neil Hutton, Graham Work it, wrap it, fix it, fold it |
| title | Work it, wrap it, fix it, fold it |
| title_full | Work it, wrap it, fix it, fold it |
| title_fullStr | Work it, wrap it, fix it, fold it |
| title_full_unstemmed | Work it, wrap it, fix it, fold it |
| title_short | Work it, wrap it, fix it, fold it |
| title_sort | work it, wrap it, fix it, fold it |
| url | https://eprints.nottingham.ac.uk/28182/ https://eprints.nottingham.ac.uk/28182/ https://eprints.nottingham.ac.uk/28182/ |