SPELL: Synthesis of Programmatic Edits using LLMs
Daniel Ramos, Catarina Gamboa, In\^es Lynce, Vasco Manquinho, Ruben Martins, Claire Le Goues

TL;DR
This paper introduces SPELL, a novel method that leverages large language models to extract and synthesize reusable code transformation scripts for automated library migration, overcoming data scarcity and manual effort.
Contribution
SPELL uses LLMs to generate migration examples and generalize them into transformation scripts, enabling automated API migration without relying on existing migration data.
Findings
Successfully generates diverse migration examples.
Synthesizes transformation scripts that generalize to real-world code.
Outperforms existing tools in Python library migrations.
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Software Testing and Debugging Techniques · Model-Driven Software Engineering Techniques
