Editor Specialization: Deriving DSL Editors through Editing Service Lifting
Domain-specific languages (DSLs) are widely used across various domains. Code editors for these DSLs significantly enhance the efficiency and enjoyment when programming in these languages by providing language-specific editing services such as code completion, navigation, and error diagnostics. However, implementing such editors for new DSLs often requires extensive manual work started from scratch, to specify both the semantic models of the DSLs and the behavior of these editing services.
In this paper, we present the design and implementation of LedTart, a novel framework for editor specialization that supports both constructing liftable host language servers and deriving specialized editors for DSLs defined as syntactic sugars on the host language. Our idea is to lift the editing services implemented in the host editor into those of the DSLs. To support this lifting process, we present a liftable design of editing services that encompasses language-specific and language-agnostic components, lifting the former part and reusing the latter. With LedTart, DSL developers only need to provide a DSL grammar and syntactic sugar definitions, and they will obtain an editor specialized for their DSL with 8 common editing services defined in the Language Server Protocol for free. We have used LedTart to generate editors for 10 DSLs, each with fewer than 160 lines of code, which is a reduction of approximately 90% in input code size in total compared to traditional language workbench methods.
| (ledtart_preprint.pdf) | 1.4MiB |
| (ledtart_demo.mp4) | 8.84MiB |
Sat 18 JulDisplayed time zone: Brisbane change
16:00 - 17:30 | Session 5: Program Analysis, Verification, and Code TransformationResearch Track / New Idea at Ballroom Chair(s): Zihan Wang The University of Queensland and CSIRO's Data61 | ||
16:00 15mTalk | Bypassing Redundant Safety Checks in Rust via Static Analysis Research Track Yunlong Yu Shandong University, Qingdan Meng Shandong University, Wei Zhang Shandong University, Lei Ju Shandong University | ||
16:15 15mTalk | Feedback-Oriented Retrieval and Guided Editing for Java Meta-Decompilation Research Track | ||
16:30 15mTalk | Value Analysis of Floating-Point Fortran Programs by Combining Interval and Zonotopic Abstractions Research Track Dengping Wei National University of Defense Technology, Banghu Yin College of Computer, National University of Defense Technology, Changsha, China, Yi Huang National University of Defense Technology, Liqian Chen National University of Defense Technology File Attached | ||
16:45 15mTalk | Editor Specialization: Deriving DSL Editors through Editing Service Lifting Research Track Ziheng Wang Peking University, Zhichao Guan Peking University, Xiaoyang Lu Purdue University, Di Wang Peking University, Hongjie Chen Peking University, Zhenjiang Hu Peking University File Attached | ||
17:00 15mTalk | Predicates with One Hole for Linked Data Structures in Separation Logic Research Track Xingpeng Liu National University of Defense Technology, Yanjun Wen National University of Defense Technology, Hengzhu Liu National University of Defense Technology, Ji Wang National University of Defense Technology | ||
17:15 15mTalk | ACSLAgent: Generation and Synthesis of Formal Specifications for C programs via LLM-based Agent New Idea Lezhi Ma Nanjing University, Han Wang Nanjing University, Shangqing Liu Nanjing University, Lei Bu Nanjing University | ||