CPS Semantics: Smoother Nondeterminism in Operational Semantics - Inria - Institut national de recherche en sciences et technologies du numérique
Pré-Publication, Document De Travail Année : 2021

CPS Semantics: Smoother Nondeterminism in Operational Semantics

Résumé

This paper introduces the CPS-big-step and CPS-small-step judgments. These two judgments describe operational semantics by relating starting states to sets of outcomes rather than to individual outcomes. A single derivation of these semantics for a particular starting state and program describes all possible nondeterministic executions, whereas in traditional small-step and big-step semantics, each derivation only talks about one single execution. We demonstrate how this restructuring allows for straightforward modeling of languages featuring both nondeterminism and undefined behavior. Specifically, our semantics inherently assert safety, i.e. they guarantee that none of the execution branches gets stuck, while traditional semantics need either a separate judgment or additional error markers to specify safety in the presence of nondeterminism. Applications presented include proofs of type soundness for lambda calculi, mechanical derivation of reasoning rules for program verification, and a forward proof of compiler correctness for terminating but potentially nondeterministic programs. All results in this paper have been formalized in Coq.
Fichier principal
Vignette du fichier
cps_semantics.pdf (685.6 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03255472 , version 1 (09-06-2021)
hal-03255472 , version 2 (17-03-2022)
hal-03255472 , version 3 (28-09-2022)

Identifiants

  • HAL Id : hal-03255472 , version 1

Citer

Arthur Charguéraud, Adam Chlipala, Andres Erbsen, Samuel Gruetter. CPS Semantics: Smoother Nondeterminism in Operational Semantics. 2021. ⟨hal-03255472v1⟩
736 Consultations
456 Téléchargements

Partager

More