×

The logical essence of compiling with continuations. (English) Zbl 07929334

Gaboardi, Marco (ed.) et al., 8th international conference on formal structures for computation and deduction, FSCD 2023, Rome, Italy, July 3–6, 2023. Wadern: Schloss Dagstuhl – Leibniz-Zentrum für Informatik. LIPIcs – Leibniz Int. Proc. Inform. 260, Article 19, 21 p. (2023).
Summary: The essence of compiling with continuations is that conversion to continuation-passing style (CPS) is equivalent to a source language transformation converting to administrative normal form (ANF). Taking as source language E. Moggi’s [Logic in computer science, Proc. 4th Annual Symp., Pacific Grove/CA (USA) 1989, 14–23 (1989; Zbl 0716.03007)] computational lambda-calculus \((\lambda\text{C})\), we define an alternative to the CPS-translation with target in the sequent calculus LJQ, named value-filling style (VFS) translation, and making use of the ability of the sequent calculus to represent contexts formally. The VFS-translation requires no type translation: indeed, double negations are introduced only when encoding the VFS target language in the CPS target language. This optional encoding, when composed with the VFS-translation reconstructs the original CPS-translation. Going back to direct style, the ëssenceöf the VFS-translation is that it reveals a new sublanguage of ANF, the value-enclosed style (VES), next to another one, the continuation-enclosing style (CES): such an alternative is due to a dilemma in the syntax of \(\lambda\text{C}\), concerning how to expand the application constructor. In the typed scenario, VES and CES correspond to an alternative between two proof systems for call-by-value, LJQ and natural deduction with generalized applications, confirming proof theory as a foundation for intermediate representations.
For the entire collection see [Zbl 1518.68012].

MSC:

03B70 Logic in computer science
68Qxx Theory of computing

Citations:

Zbl 0716.03007