Reference. S4 modal sequent calculus as intermediate logic and intermediate language

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.

Cite

Cite as @caspar-2026-s4 (helia, typst) · \cite{caspar-2026-s4} (LaTeX)
BibTeX
bibtex · 8 lines
@misc{caspar-2026-s4,
  author = {Jean Caspar and Guillaume Munch-Maccagnoni},
  title = {S4 modal sequent calculus as intermediate logic and intermediate language},
  year = {2026},
  month = {1},
  eprint = {2601.08071},
  archiveprefix = {arXiv}
}
hayagriva YAML (typst)
yaml · 9 lines
caspar-2026-s4:
  type: misc
  title: S4 modal sequent calculus as intermediate logic and intermediate language
  author:
  - Caspar, Jean
  - Munch-Maccagnoni, Guillaume
  date: 2026-01
  serial-number:
    arxiv: '2601.08071'
Cites 24 works (3 here)
With notes (3)

A theory of effects and resources: adjunction models and polarised calculi curien-2016-a

DOI · pldb

Focalisation and Classical Realisability munchmaccagnoni-2009-focalisation

DOI

A mixed linear and non-linear logic: Proofs, terms and models: Extended abstract bentonMixedLinearNonlinear1995

Intuitionistic linear logic regains the expressive power of intuitionistic logic through the ! (‘of course’) modality. Benton, Bierman, Hyland and de Paiva have given a term assignment system for ILL and an associated notion of categorical model in which the ! modality is modelled by a comonad satisfying certain extra conditions. Ordinary intuitionistic logic is then modelled in a cartesian closed category which arises as a full subcategory of the category of coalgebras for the comonad. This paper attempts to explain the connection between ILL and IL more directly and symmetrically by giving a logic, term calculus and categorical model for a system in which the linear and non-linear worlds exist on an equal footing, with operations allowing one to pass in both directions. We start from the categorical model of ILL given by Benton, Bierman, Hyland and de Paiva and show that this is equivalent to having a symmetric monoidal adjunction between a symmetric monoidal closed category and a cartesian closed category. We then derive both a sequent calculus and a natural deduction presentation of the logic corresponding to the new notion of model.
DOI
External (21)
caspar-2026-s4 reference entries/refs/caspar-2026-s4/caspar-2026-s4.hel