paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Inferring scope through syntactic sugar

通过语法糖推断作用域
ICFP 1(ICFP)2017匹配度 2/10 · 该论文研究表面语言作用域推断与脱糖保持 α-等价,属于纯 PL/形式语义与语言设计,和用户当前主线的 AI×PL、Agentic 程序静态分析、浮点程序分析及贝叶斯程序分析没有直接交叉。虽然可为静态分析提供形式化基础,但未涉及 LLM、机器学习系统或相关 benchmark。引用 8 inbox
Justin Pombrio, Shriram Krishnamurthi, Mitchell Wand
dblp: 2026-09-10crossref: 2026-09-10

AI 速览

一句话:提出作用域推断,将核心语言的作用域规则提升到表面语言,并证明脱糖保持 α-等价。

许多语言用语法糖将表面语言定义为更小核心语言的扩展,因此表面语言的作用域规则并不显式,而 IDE、重构工具等源码工具却依赖这些规则来展示信息并可靠操作。本文提出作用域推断,将定义在核心语言上的作用域规则提升到表面语言。作者引入一种新的绑定结构表示——将作用域视为预序(preorder),并给出理论进展:证明脱糖系统在仅为核心语言提供作用域规则的情况下仍保持 α-等价。论文还实现了所提出的系统。

问题
表面语言的语法糖定义掩盖了其作用域规则,而 IDE、重构器等源码工具需要这些规则来正确展示信息和执行操作。
方法
提出作用域推断,将核心语言的作用域规则提升到表面语言;引入以预序表示作用域的新绑定结构表示,并证明脱糖保持 α-等价。
评估
论文实现了该系统,并通过理论证明(脱糖系统保持 α-等价)展示其正确性。
原文摘要(Abstract)

Many languages use syntactic sugar to define parts of their surface language in terms of a smaller core. Thus some properties of the surface language, like its scoping rules , are not immediately evident. Nevertheless, IDEs, refactorers, and other tools that traffic in source code depend on these rules to present information to users and to soundly perform their operations. In this paper, we show how to lift scoping rules defined on a core language to rules on the surface, a process of scope inference . In the process we introduce a new representation of binding structure---scope as a preorder---and present a theoretical advance: proving that a desugaring system preserves α-equivalence even though scoping rules have been provided only for the core language. We have also implemented the system presented in this paper.

链接与引用

DOI 原文 · PDF(开放获取) · DBLP

BibTeX
@article{PombrioKW17,
  title = {Inferring scope through syntactic sugar},
  author = {Justin Pombrio and Shriram Krishnamurthi and Mitchell Wand},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {1},
  number = {ICFP},
  year = {2017},
  doi = {10.1145/3110288}
}