Spell : Synthesis of Programmatic Edits Using LLMs
Daniel Ramos, Catarina Gamboa, Inês Lynce, Vasco Manquinho, Ruben Martins, Claire Le Goues
Key points
From the paper's conclusion- Our method distills latent migration knowledge from LLMs into structured, testable, and repeatable migration logic, without requiring preexisting corpora or manual engineering effort.
Abstract
Library migration is a common but error-prone task in software development. Developers may need to replace one library with another due to reasons like changing requirements or licensing changes. Migration typically entails updating and rewriting source code manually. While automated migration tools exist, most rely on mining examples from real-world projects that have already undergone similar migrations. However, these data are scarce, and collecting them for arbitrary pairs of libraries is difficult. Moreover, these migration tools often miss out on leveraging modern code transformation infrastructure. In this paper, we present a new approach to automated API migration that sidesteps the limitations described above. Instead of relying on existing migration data or using LLMs directly for transformation, we use LLMs to extract migration examples. Next, we use an agent to generalize those examples to reusable transformation scripts in PolyglotPiranha, a modern code transformation tool. Our method distills latent migration knowledge from LLMs into structured, testable, and repeatable migration logic, without requiring preexisting corpora or manual engineering effort. Experimental results across Python libraries show that our system can generate diverse migration examples and synthesize transformation scripts that generalize to real-world codebases.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- LLM-Assisted Software Migration: from Module-Level Transformation to Repository-Level IntegrationarXiv · 2026
- The Fix Is Right at Hand: Fixing Incompatibility Errors Guided by Library Knowledge for Automatic Library UpgradeProceedings of the ACM on Software Engineering · 2026
- CodeMeepo: A Multi-Agent Workflow for Repository-Level Code Migration and OptimizationarXiv · 2026
- Hybrid LLM-Deterministic Pipelines for Enterprise-Scale Code Migration at BloombergarXiv · 2026
- Byam: Fixing Breaking Dependency Updates with Large Language ModelsEmpirical Software Engineering · 2026
- MOCA: A Hierarchical Semantic-Enhanced Code Edit Framework for Multilingual Code Co-EvolutionACM Transactions on Software Engineering and Methodology · 2026