Lune

OOPSLA2024顶会

Deriving Dependently-Typed OOP from First Principles

David Binder, Ingo Skupin, Tim Süberkrüb, Klaus Ostermann

摘要

The expression problem describes how most types can easily be extended with new ways to produce the type or new ways to consume the type, but not both. When abstract syntax trees are defined as an algebraic data type, for example, they can easily be extended with new consumers, such as print or eval, but adding a new constructor requires the modification of all existing pattern matches. The expression problem is one way to elucidate the difference between functional or data-oriented programs (easily extendable by new consumers) and object-oriented programs (easily extendable by new producers). This difference between programs which are extensible by new producers or new consumers also exists for dependently typed programming, but with one core difference: Dependently-typed programming almost exclusively follows the functional programming model and not the object-oriented model, which leaves an interesting space in the programming language landscape unexplored. In this paper, we explore the field of dependently-typed object-oriented programming by deriving it from first principles using the principle of duality. That is, we do not extend an existing objectoriented formalism with dependent types in an ad-hoc fashion, but instead start from a familiar data-oriented language and derive its dual fragment by the systematic use of defunctionalization and refunctionalization. Our central contribution is a dependently typed calculus which contains two dual language fragments. We provide type-and semantics-preserving transformations between these two language fragments: defunctionalization and refunctionalization. We have implemented this language and these transformations and use this implementation to explain the various ways in which constructions in dependently typed programming can be explained as special instances of the general phenomenon of duality.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

它引用的引用它的从左到右按年份排列,引用越多,位置越高。

它引用的 Paper2

  1. Defunctionalization with Dependent TypesYulong Huang, Jeremy YallopPLDI 2023 · 4 次引用
  2. Decomposition diversity with symmetric data and codataDavid Binder, Julian Jabs, Ingo Skupin, Klaus OstermannPOPL 2020 · 2 次引用

相关 Paper

  1. Exact Recursive Probabilistic ProgrammingDavid Chiang, Colin McDonald, Chung-chieh ShanOOPSLA 2023 · 12 次引用
  2. Internalizing Indistinguishability with Dependent TypesYiyun Liu, Jonathan Chan, Jessica Shi, Stephanie WeirichPOPL 2024 · 3 次引用
  3. Extensible Metatheory Mechanization via Family PolymorphismEnde Jin, Nada Amin, Yizhou ZhangPLDI 2023 · 10 次引用
  4. A case for DOT: theoretical foundations for objects with pattern matching and GADT-style reasoningAleksander Boruch-Gruszecki, Radoslaw Wasko, Yichen Xu, Lionel ParreauxOOPSLA 2022 · 4 次引用
  5. A Dependent Type Theory for Meta-programming with Intensional AnalysisJason Z. S. Hu, Brigitte PientkaPOPL 2025 · 2 次引用
黄昏的海面,两侧是细线勾勒的悬崖