Lune

POPL2025Top-tier venue

Denotational Semantics of Gradual Typing using Synthetic Guarded Domain Theory

Eric Giovannini, Tingting Ding, Max S. New

Abstract

Gradually typed programming languages, which allow for soundly mixing static and dynamically typed programming styles, present a strong challenge for metatheorists. Even the simplest sound gradually typed languages feature at least recursion and errors, with realistic languages featuring furthermore runtime allocation of memory locations and dynamic type tags. Further, the desired metatheoretic properties of gradually typed languages have become increasingly sophisticated: validity of type-based equational reasoning as well as the relational property known as graduality. Many recent works have tackled verifying these properties, but the resulting mathematical developments are highly repetitive and tedious, with few reusable theorems persisting across different developments.

In this work, we present a new denotational semantics for gradual typing developed using guarded domain theory. Guarded domain theory combines the generality of step-indexed logical relations for modeling advanced programming features with the modularity and reusability of denotational semantics. We demonstrate the feasibility of this approach with a model of a simple gradually typed lambda calculus and prove the validity of beta-eta equality and the graduality theorem for the denotational model. This model should provide the basis for a reusable mathematical theory of gradually typed program semantics. Finally, we have mechanized most of the core theorems of our development in Guarded Cubical Agda, a recent extension of Agda with support for the guarded recursive constructions we use.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Modelling Recursion and Probabilistic Choice in Guarded Type Theory cites Greatest HITs: Higher inductive types in coinductive definitions via induction under clocks
  • Modelling Recursion and Probabilistic Choice in Guarded Type Theory cites Modular Denotational Semantics for Effects with Guarded Interaction Trees
  • Gradual Typing for Effect Handlers cites Graduality and parametricity: together again for the first time
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Notions of Stack-Manipulating Computation and Relative MonadsYuchen Jiang, Runze Xue, Max S. NewOOPSLA 2025 · 2 citations
  2. Modelling Recursion and Probabilistic Choice in Guarded Type TheoryPhilipp Stassen, Rasmus Ejlers Møgelberg, Maaike Zwart, Alejandro Aguirre et al.POPL 2025 · 1 citation

Builds on6

  1. Graduality and parametricity: together again for the first timeMax S. New, Dustin Jamner, Amal AhmedPOPL 2020 · 36 citations
  2. Modular Denotational Semantics for Effects with Guarded Interaction TreesDan Frumin, Amin Timany, Lars BirkedalPOPL 2024 · 13 citations
  3. Greatest HITs: Higher inductive types in coinductive definitions via induction under clocksMagnus Baunsgaard Kristensen, Rasmus Ejlers Møgelberg, Andrea VezzosiLICS 2022 · 8 citations
  4. Deep and shallow types for gradual languagesBen GreenmanPLDI 2022 · 7 citations
  5. Gradual Typing for Effect HandlersMax S. New, Eric Giovannini, Daniel R. LicataOOPSLA 2023 · 3 citations

Related papers

  1. Abstracting gradual typing moving forward: precise and space-efficientFelipe Bañados Schwerter, Alison M. Clark, Khurram A. Jafery, Ronald GarciaPOPL 2021 · 13 citations
  2. A Gradual Probabilistic Lambda CalculusWenjia Ye, Matías Toro, Federico OlmedoOOPSLA 2023 · 3 citations
  3. Gradually Typed Languages Should Be Vigilant!Olek Gierczak, Lucy Menon, Christos Dimoulas, Amal AhmedOOPSLA 2024 · 1 citation
  4. Label dependent lambda calculus and gradual typingWeili Fu, Fabian Krause, Peter ThiemannOOPSLA 2021
  5. Gradually structured dataStefan Malewski, Michael Greenberg, Éric TanterOOPSLA 2021 · 4 citations
Dusk over the sea between two cliffs drawn in fine vertical lines