Continuation-passing style, defunctionalization, accumulations, and associativity

<p><strong>Context:</strong> Reynolds showed us how to use continuation-passing style and defunctionalization to transform a recursive interpreter for a language into an abstract machine for programs in that language. The same techniques explain other programming tricks, including...

Full description

Bibliographic Details
Main Author: Gibbons, J
Format: Journal article
Language:English
Published: AOSA, Inc. 2021
_version_ 1826307642554843136
author Gibbons, J
author_facet Gibbons, J
author_sort Gibbons, J
collection OXFORD
description <p><strong>Context:</strong> Reynolds showed us how to use continuation-passing style and defunctionalization to transform a recursive interpreter for a language into an abstract machine for programs in that language. The same techniques explain other programming tricks, including zippers and accumulating parameters.</p> <p><strong>Inquiry:</strong> Buried within all those applications there is usually a hidden appeal to the algebraic property of associativity. Approach: Our purpose in this paper is to entice associativity out of the shadows and into the limelight.</p> <p><strong>Knowledge:</strong> We revisit some well-known applications (factorial, fast reverse, tree flattening, and a compiler for a simple expression language) to spotlight their dependence on associativity.</p> <p><strong>Grounding:</strong> We replay developments of these programs through a series of program transformations and data refinements, justified by equational reasoning.</p> <p><strong>Importance:</strong> Understanding the crucial role played by associativity clarifies when continuation-passing style and defunctionalization can help and when they cannot, and may prompt other applications of these techniques.</p>
first_indexed 2024-03-07T07:06:13Z
format Journal article
id oxford-uuid:6e2d6de6-b01f-4263-bf12-3568bc3d8df0
institution University of Oxford
language English
last_indexed 2024-03-07T07:06:13Z
publishDate 2021
publisher AOSA, Inc.
record_format dspace
spelling oxford-uuid:6e2d6de6-b01f-4263-bf12-3568bc3d8df02022-05-13T10:31:48ZContinuation-passing style, defunctionalization, accumulations, and associativityJournal articlehttp://purl.org/coar/resource_type/c_dcae04bcuuid:6e2d6de6-b01f-4263-bf12-3568bc3d8df0EnglishSymplectic ElementsAOSA, Inc.2021Gibbons, J<p><strong>Context:</strong> Reynolds showed us how to use continuation-passing style and defunctionalization to transform a recursive interpreter for a language into an abstract machine for programs in that language. The same techniques explain other programming tricks, including zippers and accumulating parameters.</p> <p><strong>Inquiry:</strong> Buried within all those applications there is usually a hidden appeal to the algebraic property of associativity. Approach: Our purpose in this paper is to entice associativity out of the shadows and into the limelight.</p> <p><strong>Knowledge:</strong> We revisit some well-known applications (factorial, fast reverse, tree flattening, and a compiler for a simple expression language) to spotlight their dependence on associativity.</p> <p><strong>Grounding:</strong> We replay developments of these programs through a series of program transformations and data refinements, justified by equational reasoning.</p> <p><strong>Importance:</strong> Understanding the crucial role played by associativity clarifies when continuation-passing style and defunctionalization can help and when they cannot, and may prompt other applications of these techniques.</p>
spellingShingle Gibbons, J
Continuation-passing style, defunctionalization, accumulations, and associativity
title Continuation-passing style, defunctionalization, accumulations, and associativity
title_full Continuation-passing style, defunctionalization, accumulations, and associativity
title_fullStr Continuation-passing style, defunctionalization, accumulations, and associativity
title_full_unstemmed Continuation-passing style, defunctionalization, accumulations, and associativity
title_short Continuation-passing style, defunctionalization, accumulations, and associativity
title_sort continuation passing style defunctionalization accumulations and associativity
work_keys_str_mv AT gibbonsj continuationpassingstyledefunctionalizationaccumulationsandassociativity