Identifying Latent Declarative Representations of Code for Assisting Repository Migration
Not on the map. Why?
Abstract (arXiv)
Legacy software repositories embed decades of domain knowledge in undocumented code, making understanding and modernization difficult. We treat a program as the implementation of an unobserved, declarative description of its computation and investigate whether making this latent declarative representation explicit improves repository-scale porting. ADFD-Migrate approximates the latent representation with an annotated data-flow diagram (ADFD) of processes, data stores, external entities, flows, and behavioral contracts. An LLM infers the source ADFD from bounded repository context, guided by static-analysis coverage checks. Dependency-aware chunking orders bounded process groups for target-language generation. Differences between the source ADFD and a statically recovered target ADFD then guide regeneration. We evaluate ADFD-Migrate on f2x50, a new benchmark of 50~Fortran repositories spanning 1.5k--1.6M lines of code and three complexity tiers, and assess the resulting ports along two dimensions: porting soundness, measured by source-oracle behavioral agreement, and porting completeness, measured by a composite migration outcome index. Against 382 curated Fortran-oracle probes, the generated Python passes 327 (85.6%), with 40 repositories passing every attempted probe. ADFD-Migrate exposes all 382 planned behaviors as runnable targets, compared with 99 and 98 for direct and repository-context translation and 69 and 30 for the static-profile and dependency-chunking ablations. It also achieves a 93.1% mean migration outcome index and a 17--59 percentage-point outcome-index advantage over direct translation on 47 repositories. These results suggest that an inspectable semantic bottleneck can improve the coverage and integration of repository-scale migration while enabling lower-cost generation for many repositories.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 15 of its 36 references that are in the map. First posted on arXiv 22 Aug 2026.
Builds on
15 of 36 references.
References · 15
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Lost in the Middle: How Language Models Use Long Contextscited by 3,455
- 2023Code Llama: Open Foundation Models for Codecited by 2,139
- 2021CodeXGLUE: A Machine Learning Benchmark Dataset for Code Understanding and Generationcited by 744
- 2024LLM Evaluators Recognize and Favor Their Own Generationscited by 686
- 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 479
- 2023CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-Xcited by 300
- 2020Unsupervised Translation of Programming Languagescited by 263
- 2023CodePlan: Repository-level Coding using LLMs and Planningcited by 140
- 2024Exploring and Unleashing the Power of Large Language Models in Automated Code Translationcited by 57
- 2024AlphaTrans: A Neuro-Symbolic Compositional Approach for Repository-Level Code Translation and Validationcited by 28
- 2024Rectifier: Code Translation with Corrector via LLMscited by 20
3 more
Built on by
Not cited yet.