A Formalization of Opaque Definitions for a Dependent Type Theory
Paper i proceeding, 2025

Definitions allow for reuse of code. Typical type-checkers for dependently typed programming languages automatically unfold definitions, but excessive unfolding can lead to types that are hard to read, or performance issues. Such problems can be mitigated through the use of opaque definitions, which give the programmer control over when unfolding is allowed. However, subject reduction fails to hold for certain designs. We study the metatheory of a type theory with opaque definitions, inspired by Agda. We give typing and reduction rules and show that the type theory enjoys properties like subject reduction, normalization, consistency, and decidability of conversion. The development is fully mechanized in Agda.

Agda

dependent types

formalization

opaque definitions

Författare

Nils Anders Danielsson

Göteborgs universitet

Chalmers, Data- och informationsteknik, Computing Science

Eve Geng

Tyde 2025 Proceedings of the 10th ACM SIGPLAN International Workshop on Type Driven Development Co Located with ICFP Splash 2025

39-51
9798400721632 (ISBN)

10th ACM SIGPLAN International Workshop on Type-Driven Development, TyDe 2025, co-located with ICFP/SPLASH 2025
Singapore, Singapore,

Ämneskategorier (SSIF 2025)

Datavetenskap (datalogi)

DOI

10.1145/3759538.3759653

Mer information

Senast uppdaterat

2025-11-19