Lune

OOPSLA2025Top-tier venue

Language-Parametric Reference Synthesis

Daniël A. A. Pelsmaeker, Aron Zwaan, Casper Bach Poulsen, Arjan J. Mooij

Abstract

Modern Integrated Development Environments (IDEs) offer automated refactorings to aid programmers in developing and maintaining software. However, implementing sound automated refactorings is challenging, as refactorings may inadvertently introduce name-binding errors or cause references to resolve to incorrect declarations. To address these issues, previous work by Schäfer et al. proposed replacing concrete references with locked references to separate binding preservation from transformation. Locked references vacuously resolve to a specific declaration, and after transformation must be replaced with concrete references that also resolve to that declaration. Synthesizing these references requires a faithful inverse of the name lookup functions of the underlying language.

Manually implementing such inverse lookup functions is challenging due to the complex name-binding features in modern programming languages. Instead, we propose to automatically derive this function from type system specifications written in the Statix meta-DSL. To guide the synthesis of qualified references we use scope graphs, which represent the binding structure of a program, to infer their names and discover their syntactic structure.

We evaluate our approach by synthesizing concrete references for locked references in 2528 Java, 196 ChocoPy, and 49 Featherweight Generic Java test programs. Our approach yields a principled languageparametric method for synthesizing references.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Language-parametric static semantic code completion cites Knowing when to ask: sound scheduling of name resolution in type checkers derived from declarative specifications
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on2

  1. Language-parametric static semantic code completionDaniël A. A. Pelsmaeker, Hendrik van Antwerpen, Casper Bach Poulsen, Eelco VisserOOPSLA 2022 · 10 citations
  2. Knowing when to ask: sound scheduling of name resolution in type checkers derived from declarative specificationsArjen Rouvoet, Hendrik van Antwerpen, Casper Bach Poulsen, Robbert Krebbers et al.OOPSLA 2020 · 9 citations

Related papers

  1. Incremental type-checking for free: using scope graphs to derive incremental type-checkersAron Zwaan, Hendrik van Antwerpen, Eelco VisserOOPSLA 2022 · 3 citations
  2. Synthesizing data structure refinements from integrity constraintsShankara Pailoor, Yuepeng Wang, Xinyu Wang, Isil DilligPLDI 2021 · 10 citations
  3. Counterexample-Guided Partial Bounding for Recursive Function SynthesisAzadeh Farzan, Victor NicoletCAV 2021 · 13 citations
  4. MAKO: Refining Indirect-Call Targets with Type Relation UnfoldingYibo Jin, Wei Chen, Bowen Zhang, Charles ZhangCCS 2026
  5. Type-directed synthesis of visualizations from natural language queriesQiaochu Chen, Shankara Pailoor, Celeste Barnaby, Abby Criswell et al.OOPSLA 2022 · 15 citations
Dusk over the sea between two cliffs drawn in fine vertical lines