Language-parametric static semantic code completion
Daniël A. A. Pelsmaeker, Hendrik van Antwerpen, Casper Bach Poulsen, Eelco Visser
摘要
Code completion is an editor service in IDEs that proposes code fragments for the user to insert at the caret position in their code. Code completion should be sound and complete. It should be sound, such that it only proposes fragments that do not violate the syntactic and static semantic rules of the language. It should be complete, such that it proposes all valid fragments so that code completion can be used to construct all programs. To realize soundness and completeness, code completion should be informed by the language definition. In practice, the implementation of code completion is an additional effort in the implementation of a language.
In this paper, we develop a framework for language-parametric semantic code completion for statically typed programming languages based on their specification of syntax and static semantics, realizing the implementation of a code completion editor service with minimal additional effort. The framework builds on the SDF3 syntax definition formalism and the Statix static semantics specification language. The algorithm reinterprets the static semantics definition to find sound expansions of predicates and solutions to name resolution queries in scope graphs. This allows a search strategy to explore the solution space and synthesize completion proposals. The implementation of the strategy language and code completion algorithm extend the implementation of the Statix solver, and can be used for any language defined in Statix. We demonstrate soundness and completeness of the completion proposal synthesis, and evaluate its performance.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper3
- Two Birds with One Stone: Boosting Code Generation and Code Search via a Generative Adversarial NetworkShangwen Wang, Bo Lin, Zhensu Sun, Ming Wen 等OOPSLA 2023 · 被引用 21 次
- Incremental type-checking for free: using scope graphs to derive incremental type-checkersAron Zwaan, Hendrik van Antwerpen, Eelco VisserOOPSLA 2022 · 被引用 3 次
- Language-Parametric Reference SynthesisDaniël A. A. Pelsmaeker, Aron Zwaan, Casper Bach Poulsen, Arjan J. MooijOOPSLA 2025 · 被引用 1 次
它引用的顶会 Paper1
相关 Paper
- Semantics Lifting for Syntactic SugarZhichao Guan, Yiyuan Cao, Tailai Yu, Ziheng Wang 等OOPSLA 2024 · 被引用 1 次
- How Practitioners Expect Code Completion?Chaozheng Wang, Junhao Hu, Cuiyun Gao, Yu Jin 等FSE 2023 · 被引用 24 次
- Synthesizing Formal Semantics from Executable InterpretersJiangyi Liu, Charlie Murphy, Anvay Grover, Keith J. C. Johnson 等OOPSLA 2024
- Graduality and parametricity: together again for the first timeMax S. New, Dustin Jamner, Amal AhmedPOPL 2020 · 被引用 36 次
- One down, 699 to go: or, synthesising compositional desugaringsSándor Bartha, James Cheney, Vaishak BelleOOPSLA 2021 · 被引用 2 次
