Semantics Lifting for Syntactic Sugar
Zhichao Guan, Yiyuan Cao, Tailai Yu, Ziheng Wang, Di Wang, Zhenjiang Hu
摘要
Syntactic sugar plays a crucial role in engineering programming languages. It offers convenient syntax and higher-level of abstractions, as witnessed by its pervasive use in both general-purpose and domain-specific contexts. Unfortunately, the traditional approach of translating programs containing syntactic sugars into the host language can lead to abstraction leakage, breaking the promise of convenience and hindering program comprehension. To address this challenge, we introduce the idea of semantics lifting that aims to statically derive self-contained evaluation rules for syntactic sugars. More specifically, we propose a semantics-lifting framework that consists of (i) a general algorithm for deriving host-independent semantics of syntactic sugars from the semantics of the host language and the desugaring rules, (ii) a formulation of the correctness and abstraction properties for a lifted semantics, and (iii) a systematic investigation of sufficient conditions that ensure a lifted semantics is provably correct and abstract. To evaluate our semantics-lifting framework, we have implemented a system named Osazone and conducted several case studies, demonstrating that our approach is flexible, effective, and practical for implementing domain-specific languages.
问问这篇 Paper
问问你的智能体。
Lune 读过与它相关的顶会 Paper,每个回答都会注明依据哪几篇。
相关 Paper
- Localizing Type Errors for Syntactic Sugar by LiftingZhichao Guan, Tailai Yu, Di Wang, Zhenjiang HuOOPSLA 2026
- One down, 699 to go: or, synthesising compositional desugaringsSándor Bartha, James Cheney, Vaishak BelleOOPSLA 2021 · 被引用 2 次
- Data flow refinement type inferenceZvonimir Pavlinovic, Yusen Su, Thomas WiesPOPL 2021 · 被引用 15 次
- Verified Code Transpilation with LLMsSahil Bhatia, Jie Qiu, Niranjan Hasabnis, Sanjit A. Seshia 等NeurIPS 2024 · 被引用 36 次
- Automating Pruning in Top-Down Enumeration for Program Synthesis Problems with Monotonic SemanticsKeith J. C. Johnson, Rahul Krishnan, Thomas W. Reps, Loris D'AntoniOOPSLA 2024 · 被引用 2 次
