Lune

OOPSLA2021Top-tier venue

Transitioning from structural to nominal code with efficient gradual typing

Fabian Muehlboeck, Ross Tate

Abstract

Gradual typing is a principled means for mixing typed and untyped code. But typed and untyped code often exhibit different programming patterns. There is already substantial research investigating gradually giving types to code exhibiting typical untyped patterns, and some research investigating gradually removing types from code exhibiting typical typed patterns. This paper investigates how to extend these established gradual-typing concepts to give formal guarantees not only about how to change types as code evolves but also about how to change such programming patterns as well. In particular, we explore mixing untyped "structural" code with typed "nominal" code in an object-oriented language. But whereas previous work only allowed "nominal" objects to be treated as "structural" objects, we also allow "structural" objects to dynamically acquire certain nominal types, namely interfaces. We present a calculus that supports such "cross-paradigm" code migration and interoperation in a manner satisfying both the static and dynamic gradual guarantees, and demonstrate that the calculus can be implemented efficiently.

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.

5 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

  • How Profilers Can Help Navigate Type Migration cites Corpse reviver: sound and efficient gradual typing via contract verification
  • Deep and shallow types for gradual languages cites Corpse reviver: sound and efficient gradual typing via contract verification
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers5

  1. Deep and shallow types for gradual languagesBen GreenmanPLDI 2022 · 7 citations
  2. Merging Gradual TypingWenjia Ye, Bruno C. d. S. Oliveira, Matías ToroOOPSLA 2024 · 2 citations
  3. Float Self-TaggingOlivier Melançon, Manuel Serrano, Marc FeeleyOOPSLA 2025 · 1 citation
  4. How Profilers Can Help Navigate Type MigrationBen Greenman, Matthias Felleisen, Christos DimoulasOOPSLA 2023 · 1 citation
  5. Type-Safe Monotonic Object EvolutionAlexandra Mirrlees-Black, Haoyu Wu, Gregor Richards, Fabian MuehlboeckOOPSLA 2026

Builds on1

  1. Corpse reviver: sound and efficient gradual typing via contract verificationCameron Moy, Phuc C. Nguyen, Sam Tobin-Hochstadt, David Van HornPOPL 2021 · 16 citations

Related papers

  1. Solver-based gradual type migrationLuna Phipps-Costin, Carolyn Jane Anderson, Michael Greenberg, Arjun GuhaOOPSLA 2021 · 16 citations
  2. Gradual Typing for Effect HandlersMax S. New, Eric Giovannini, Daniel R. LicataOOPSLA 2023 · 3 citations
  3. Gradually structured dataStefan Malewski, Michael Greenberg, Éric TanterOOPSLA 2021 · 4 citations
  4. Denotational Semantics of Gradual Typing using Synthetic Guarded Domain TheoryEric Giovannini, Tingting Ding, Max S. NewPOPL 2025 · 2 citations
  5. Where to Start: Studying Type Annotation Practices in PythonWuxia Jin, Dinghong Zhong, Zifan Ding, Ming Fan et al.ASE 2021 · 10 citations
Dusk over the sea between two cliffs drawn in fine vertical lines