[论文解读] S4 modal sequent calculus as intermediate logic and intermediate language
该论文主张基于 continuation 的中间语言对应于中间逻辑,具体地表明二类 continuations 与受限的 S4 模态逻辑一致,并提出一个带堆/栈内存模型的极化 L^□_pol 计算来研究模态片段的可栈性。
In this short paper, we advocate for the idea that continuation-based intermediate languages correspond to intermediate logics. The goal of intermediate languages is to serve as a basis for compiler intermediate representations, allowing to represent expressive program transformations for optimisation and compilation, while preserving the properties that make programs compilable efficiently in the first place, such as the "stackability" of continuations. Intermediate logics are logics between intuitionistic and classical logic in terms of provability. Second-class continuations used in CPS-based intermediate languages correspond to a classical modal logic S4 with the added restriction that implications may only return modal types. This indeed corresponds to an intermediate logic, owing to the Gödel-McKinsey-Tarski theorem which states the intuitionistic nature of the modal fragment of S4. We introduce a three-kinded polarised sequent calculus for S4, together with an operational machine model that separates a heap from a stack. With this model we study a stackability property for the modal fragment of S4.
研究动机与目标
- Motivate the use of continuation-based intermediate languages as a basis for compiler intermediate representations.
- Characterise second-class continuations as a restricted S4 modal logic and link it to intermediate logic concepts.
- Introduce a polarised sequent calculus for S4 and an operational machine model to study memory management and stackability.
提出的方法
- Define the polarised classical L-calculus extension L^□_pol for S4 with three polarities (□, +, -).
- Present a machine-like semantics with a two-part memory (heap for modal values and a stack-like region for covariables).
- Show that restricting S4 to functions returning modal types yields a stackable, second-class continuation regime.
- Relate CPS translations to a decomposition into an interpretation in L^□_pol followed by CPS, without detailing the second CPS step here.
- Provide an execution model and reduction rules that align with CBV/CBN evaluation priorities for modal vs non-modal types.
实验结果
研究问题
- RQ1Can second-class continuations be characterized by a modal logic restriction of S4?
- RQ2How does a polarised S4 sequent calculus model the separation between modal (first-class) and non-modal (second-class) types?
- RQ3Does a two-store memory model (heap plus stack) ensure stackability for the modal fragment of S4?
- RQ4How does CPS translation interact with the polarised L^□_pol calculus in this framework?
主要发现
- A polarised three-kind sequent calculus L^□_pol for classical S4 is introduced.
- A two-store memory model separates a heap for modal values from a stack that is freed when evaluating modal covariables.
- Restricting S4 to functions with modal return types recovers stackability for second-class continuations.
- The modal fragment of S4 is shown to correspond, via Gödel–McKinsey–Tarski, to an intermediate logic between intuitionistic and classical logic.
- The CPS translation framework can be decomposed into an interpretation into L^□_pol followed by a CPS translation, aligning with prior CPS decompositions.
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。