Lune

PLDI2026顶会

Contextual Embeddings: Implementing Bound Variables through Instance Resolution

Samantha Frohlich, Jessica Foster, G. A. Kavvos, Meng Wang

摘要

Representing bound variables in embedded languages is a challenging problem, often requiring painful tradeoffs between expressivity and usability. On the one hand, first-order representations using de Bruijn indices have many nice properties, but quickly become difficult to read and write. On the other hand, higher-order representations can piggy-back on the host language’s binders to offer a more ergonomic interface, at a variety of costs depending on the technique. The current state-of-the-art is unembedding, i.e. a translation from the higher-order representation to the first-order and back again to get the best of both worlds. Unfortunately, the fact that this translation is type-safe relies on external metatheoretic arguments, holding unembedding back from its true potential. We solve this problem with a new embedding technique that uses instance resolution to define a context-directed isomorphism between an ergonomic higher-order interface and a first-order representation. Unlike previous techniques, this also applies to embedded languages with modal and substructural (e.g. linear) type systems, making unembedding relevant for modern languages.

问 Lune

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

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

可以从这些问题问起

Lune 可以查阅

全文 · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

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

它引用的 Paper1

  1. Locally Nameless SetsAndrew M. PittsPOPL 2023 · 6 次引用

相关 Paper

  1. Formal metatheory of second-order abstract syntaxMarcelo Fiore, Dmitrij SzamozvancevPOPL 2022 · 20 次引用
  2. Slotted E-Graphs: First-Class Support for (Bound) Variables in E-GraphsRudi Schneider, Marcus Rossel, Amir Shaikhha, Andrés Goens 等PLDI 2025 · 1 次引用
  3. A Case for First-Class EnvironmentsJinhao Tan, Bruno C. d. S. OliveiraOOPSLA 2024
  4. Contextual MetaML: Syntax and Full AbstractionHaoxuan Yin, Andrzej S. Murawski, C.-H. Luke OngLICS 2026 · 1 次引用
  5. Defunctionalization with Dependent TypesYulong Huang, Jeremy YallopPLDI 2023 · 4 次引用
黄昏的海面,两侧是细线勾勒的悬崖