PofoliaPofolia ile paylaşıldı

Proceedings of the ACM on Programming Languages· 2026Q1

Kod–Test Eş-Çevirisi: Gerçek Dünyada Pratik ve Etkili Program Geçişi İçin

Code–Test Co-translation: Towards Practical and Effective Program Migration in the Wild

Xitao Li, Xiaofei Xie, Jianmin Wu, Ting Liu ve diğerleri

Kısa özet

Yeni bir Çerçeve olan CoTTrans, programları ve test paketlerini birlikte çevirerek kod geçişini iyileştirir ve yeni bir Test Paketi Tutarlılığı (TCC) metriği kullanarak DeepSeek-V3 üzerinde 0.360'tan 0.675'e çıkan bir çeviri doğruluk puanı elde eder.

Yapay zekâ ile başlık ve abstract'tan üretildi; tam metin okunmaz.

Ana noktalar

  • Programların ve ilgili test paketlerinin birlikte çevrilmesini gerektiren Kod–Test Eş-Çevirisi (CTCT) problemini tanıtır.
  • CTCT zorluklarını ele alan, test tutarlılığını ölçme ve karmaşık özellikleri işleme gibi konuları içeren CoTTrans çerçevesini önerir.
  • Kaynak ve çevrilmiş testler arasındaki sözdizimsel ve anlamsal uyumu değerlendirmek için yeni bir Test Paketi Tutarlılığı (TCC) metriği geliştirir.
  • CoTTrans, BigCodeBench üzerinde DeepSeek-V3 için çeviri doğruluğunu 0.360'tan 0.675'e çıkararak önceki yöntemlerden önemli ölçüde daha iyi performans gösterir.

Yapay zekâ ile başlık ve abstract'tan üretildi; tam metin okunmaz.

Özet (abstract)

Program migration, which involves translating software systems from one programming language to another, is essential for modernizing legacy systems and improving maintainability. Recent large language models (LLMs) have demonstrated strong performance in code translation; however, existing methods and benchmarks still exhibit key limitations. (1) They primarily focus on simple, self-contained snippets that fail to capture the complexity of real-world programs, and (2) they often assume that target-language test cases are readily available for evaluation and feedback, an unrealistic assumption given the difficulty of manually creating equivalent tests across languages. In this paper, we argue for a more practical setting, termed the Code–Test Co-Translation (CTCT) problem, where both the program and its associated test suite should be jointly translated to preserve semantic and functional consistency. Through an empirical study on real-world programs, we identify two major challenges in CTCT: (1) the difficulty of measuring test-case consistency in the absence of ground truth, and (2) the ineffectiveness of existing iterative translation–repair strategies, which suffer from state degradation and poor initialization traps when handling complex, real-world features. To address these issues, we propose CoTTrans, a state-quality–aware iterative translation–repair framework guided by a novel Test Case Consistency (TCC) metric. TCC quantifies both syntactic and semantic consistency between source and translated tests, enabling fine-grained feedback that drives LLM-based refinement. CoTTrans further integrates TCC with test pass rates to assess state quality and triggers adaptive backtracking when low-quality states are detected during the translation. Evaluated on the BigCodeBench dataset, CoTTrans improves the translation correctness score from 0.360 to 0.675 on DeepSeek-V3, substantially outperforming existing methods, while TCC demonstrates superior effectiveness in measuring test consistency compared with existing metrics. These results show that CoTTrans enhances translation stability and accuracy, establishing a practical foundation for reliable code–test co-evolution in real-world program migration.

Yazarların özeti; kaynağından alınmıştır. Proceedings of the ACM on Programming Languages, 2026 · DOI ↗

ÇıkarımlarPremium
Makaleye SorÜcretsiz hesapla

Ücretsiz hesapla devam et

Makaleye Sor ile bu makaleye günde 3 soru ücretsiz; makaleyi kaydet, kaynakçasını al, ilgi alanına göre her gün yeni özetler. Çıkarımlar Premium.

Web'de ücretsiz devam et

Google ya da Apple hesabınla giriş; kart istemez. Bu makaleye geri dönersin.

Telefonda:

Alan: Yazılım

SoftwareComputer Science