Lune

OOPSLA2026顶会

Localizing Type Errors for Syntactic Sugar by Lifting

Zhichao Guan, Tailai Yu, Di Wang, Zhenjiang Hu

摘要

Syntactic sugar enhances the usability of a core language by providing intuitive syntax in a surface language; however, its interaction with the core-language type checker often results in error messages that are unclear to surface programmers. Existing techniques, such as type lifting, can automatically infer typing rules for syntactic sugar, but they do not consider localizing type errors directly in the surface syntax. This paper studies the problem of localizing and reporting type errors for syntactic sugar, addressing two key challenges: precisely localizing errors and ensuring that they are fixable. Inspired by the recently proposed marked lambda calculus (MLC), we develop ℓ MLC as our core language which tracks error provenance and locations via type annotations. Building on this, we propose the Ste llar framework, which automatically lifts the core language’s typing rules to the surface language while enabling error localization in the surface syntax. Ste llar also ensures that the reported errors are fixable by incorporating extra premises into the lifted typing rules. We implement Ste llar and evaluate it across various surface languages with different type structures, demonstrating that our approach precisely localizes errors and avoids unhelpful references to core-language constructs. Our evaluation suggests that Ste llar can help surface programmers address type errors more effectively, enhancing the practicality of syntactic sugar in language engineering.

问 Lune

几分钟看清这篇 Paper 的位置,不用再花一下午。

Lune 能读引用它和与它最相关的顶会 Paper,讲清它说了什么、后来怎样、哪里站不住,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

可以从这些问题问起

Lune 可以查阅

摘要 · 相关的 Paper

获取答案

免费开始,无需绑卡

相关 Paper

  1. Total Type Error Localization and Recovery with HolesEric Zhao, Raef Maroof, Anand Dukkipati, Andrew Blinn 等POPL 2024 · 15 次引用
  2. Semantics Lifting for Syntactic SugarZhichao Guan, Yiyuan Cao, Tailai Yu, Ziheng Wang 等OOPSLA 2024 · 1 次引用
  3. One down, 699 to go: or, synthesising compositional desugaringsSándor Bartha, James Cheney, Vaishak BelleOOPSLA 2021 · 2 次引用
  4. Pluggable Type Inference for FreeMartin Kellogg, Daniel Daskiewicz, Loi Ngo Duc Nguyen, Muyeed Ahmed 等ASE 2023 · 4 次引用
  5. Rust-doctor: Enhanced Feature for Rust Ownership and Lifetime Repair with Balanced Training Data GenerationWenzhang Yang, Xiaoning Ren, Cuifeng Gao, Yinxing XueEMNLP Findings 2025
黄昏的海面,两侧是细线勾勒的悬崖