Staged Gradual Typing
Staging dynamically typed programming languages safely is a challenge, as the programming-language support for staged computation typically relies on static type systems. To solve this problem, we propose a staged gradual type system that seamlessly integrates static and dynamic typing with staged computation. Our system combines the basic gradual type system and the let-polymorphic staged type system for run-time code generation safely. We discuss the design and issues in developing the calculus, and present a type system and operational semantics via a translation to a cast calculus where dynamic type checking is made explicit. We also show several applications, such as lightweight stage polymorphism.
Authors
- Yukiyoshi Kameyama (ORCID: https://orcid.org/0000-0002-2693-5133)
- Hiroto Yaguchi
Institutions
- University of Tsukuba (JP)
Publication Details
- Published
- 2025-06-27
- DOI
- https://doi.org/10.1145/3742876.3742880
- Primary Topic
- Logic, programming, and type systems
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Japan Society for the Promotion of Science