ChatPaper.aiChatPaper

SWE-Flow: テスト駆動方式によるソフトウェアエンジニアリングデータの合成

SWE-Flow: Synthesizing Software Engineering Data in a Test-Driven Manner

June 10, 2025
著者: Lei Zhang, Jiaxi Yang, Min Yang, Jian Yang, Mouxiang Chen, Jiajun Zhang, Zeyu Cui, Binyuan Hui, Junyang Lin
cs.AI

要旨

**SWE-Flow**を紹介します。これは、テスト駆動開発(TDD)に基づいた新しいデータ合成フレームワークです。既存のソフトウェアエンジニアリングデータが人間が提出した課題に依存しているのに対し、**SWE-Flow**は、ユニットテストから直接増分的な開発ステップを自動的に推論します。ユニットテストは本質的に高レベルの要件を内包しています。**SWE-Flow**の中核は、ランタイム依存グラフ(RDG)の構築です。このグラフは関数間の相互作用を正確に捉え、構造化されたステップバイステップの*開発スケジュール*の生成を可能にします。各ステップで、**SWE-Flow**は部分的なコードベース、対応するユニットテスト、および必要なコード修正を生成し、完全に検証可能なTDDタスクを実現します。このアプローチにより、実際のGitHubプロジェクトから16,061のトレーニングインスタンスと2,020のテストインスタンスを生成し、**SWE-Flow-Eval**ベンチマークを作成しました。実験結果は、このデータセットでオープンモデルをファインチューニングすることで、TDDベースのコーディングにおけるパフォーマンスが大幅に向上することを示しています。さらなる研究を促進するため、すべてのコード、データセット、モデル、およびDockerイメージを[Github](https://github.com/Hambaobao/SWE-Flow)で公開しています。
English
We introduce **SWE-Flow**, a novel data synthesis framework grounded in Test-Driven Development (TDD). Unlike existing software engineering data that rely on human-submitted issues, **SWE-Flow** automatically infers incremental development steps directly from unit tests, which inherently encapsulate high-level requirements. The core of **SWE-Flow** is the construction of a Runtime Dependency Graph (RDG), which precisely captures function interactions, enabling the generation of a structured, step-by-step *development schedule*. At each step, **SWE-Flow** produces a partial codebase, the corresponding unit tests, and the necessary code modifications, resulting in fully verifiable TDD tasks. With this approach, we generated 16,061 training instances and 2,020 test instances from real-world GitHub projects, creating the **SWE-Flow-Eval** benchmark. Our experiments show that fine-tuning open model on this dataset significantly improves performance in TDD-based coding. To facilitate further research, we release all code, datasets, models, and Docker images at [Github](https://github.com/Hambaobao/SWE-Flow).
PDF153June 12, 2025