Our joint work with the SAL Lab (led by Prof. Hakjoo Oh), “Pig: Leveraging Large Language Models for Python Library Migrations,” has been accepted to FSE 2026, to be held in Montreal, Canada 🇨🇦.

Pig introduces a novel approach to automating Python library migration using large language models (LLMs). Although library migration is a routine task in modern Python development, existing LLM-based solutions often suffer from brittleness, frequent errors, and heavy reliance on documentation or example code.

To address these limitations, Pig adopts a structured four-step pipeline:

  1. decomposing migration tasks at the API level to minimize irrelevant context,
  2. guiding LLMs with prompts informed by common failure patterns and plausible API candidates,
  3. selectively extracting migration-relevant code from LLM outputs, and
  4. reintegrating the migrated code into the original program with post-processing to ensure semantic correctness.

In an evaluation on 364 API-level migration tasks, Pig improves the average success rate of baseline approaches by 53.5% across seven different LLMs.

📄 Preprint to appear soon. Stay tuned!