Specification-Based Code-Text-Code Reengineering for LLM-Mediated Software Evolution
Not on the map. Why?
Abstract (arXiv)
Direct Code2Code transformation remains challenging to control because it can preserve surface-level syntax while introducing semantic drift, hidden behavioral changes, loss of traceability, non-idiomatic target implementations, or incomplete reconstruction of domain logic. This paper proposes a specification-based Code2Text2Code reengineering framework for LLM-mediated software evolution. The central idea is to transform source code into a neutral textual specification that captures program behavior, identifiers, computational flow, conditions, side effects, data dependencies, and domain-specific intent without directly transferring the source language syntax. The proposed framework combines factual context extraction, Code2Text generation, iterative verification between source code and text specification, Text2Code generation, target code verification, retrieval-augmented grounding, and semantic-aware chunking, and transformation loss estimation. The knowledge representation layer integrates metadata derived from AST, graph-based dependency structures, neutral natural language specifications, technical documentation, business documentation, and architecture-level representations. The conducted experiments include a Code2Text2Code dataset built from multiple programming languages and SQL dialects, comparison of intermediate representations, retrieval evaluation, documentation transformation evaluation, and prompt tuning using DSPy. A graph formalization using structural preservation, reverse compatibility, interface stability, and total graph similarity is implemented to estimate transformation losses. The results support the interpretation of the Code2Text2Code approach not as a simple code transformation, but as a controlled specification-based reengineering process for LLM-mediated software evolution.
Key facts. Cited by 5 papers in the map (data through 7 Oct 2026). Builds on 25 of its 39 references that are in the map. First posted on arXiv 24 May 2026.
Builds on
25 of 39 references.
References · 25
- 2021Evaluating Large Language Models Trained on Codecited by 8,053
- 2021Program Synthesis with Large Language Modelscited by 3,509
- 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
- 2023Code Llama: Open Foundation Models for Codecited by 2,105
- 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
- 2023StarCoder: may the source be with you!cited by 790
- 2024A Survey on Large Language Models for Code Generationcited by 646
- 2020GraphCodeBERT: Pre-training Code Representations with Data Flowcited by 600
- 2022InCoder: A Generative Model for Code Infilling and Synthesiscited by 492
- 2023Large Language Models for Software Engineering: A Systematic Literature Reviewcited by 389
- 2018code2vec: Learning Distributed Representations of Codecited by 249
- 2022Grounded Copilot: How Programmers Interact with Code-Generating Modelscited by 216
13 more
- 2018code2seq: Generating Sequences from Structured Representations of Codecited by 177
- 2024CodeRAG-Bench: Can Retrieval Augment Code Generation?cited by 89
- 2023Fuzz4All: Universal Fuzzing with Large Language Modelscited by 88
- 2019A Neural Model for Generating Natural Language Summaries of Program Subroutinescited by 76
- 2023A Survey on Large Language Models for Software Engineeringcited by 58
- 2024SpecGen: Automated Generation of Formal Program Specifications via Large Language Modelscited by 51
- 2025Large Language Models for Code Generation: A Comprehensive Survey of Challenges, Techniques, Evaluation, and Applicationscited by 26
- 2025Retrieval-Augmented Code Generation: A Survey with Focus on Repository-Level Approachescited by 20
- 2025CodeRAG: Finding Relevant and Necessary Knowledge for Retrieval-Augmented Repository-Level Code Completioncited by 12
- 2025Code Summarization Beyond Function Levelcited by 8
- 2026Unified Architecture Metamodel of Information Systems Developed by Generative AIcited by 4
- 2025NL in the Middle: Code Translation with LLMs and Intermediate Representationscited by 2
- 2025Fine-tuned LLM-based Code Migration Frameworkcited by 2
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Token Optimization Strategies for LLM-Based Oracle-to-PostgreSQL Migrationcited by 3
- 2026Measuring What a Specification Determines: A Formal Semantic-Block Model and an Execution-Judged Benchmarkcited by 0
- 2026Specification Portability Across LLM Development Agents: Cross-Agent Compatibility in Specification-Driven Software Migrationcited by 0
- 2026From Reading Code to Reading Spec: A Verified Layer for LLM-Driven Codebase Maintenancecited by 0
- 2026A Hybrid Dependency-Aware Framework for Task Decomposition and Dynamic Agent Generation in Oracle-to-PostgreSQL Migrationcited by 0
- 2026A Hybrid Dependency-Aware Framework for Task Decomposition and Dynamic Agent Generation in Oracle-to-PostgreSQL Migration13 Sep 2026
- 2026From Reading Code to Reading Spec: A Verified Layer for LLM-Driven Codebase Maintenance6 Sep 2026
- 2026Specification Portability Across LLM Development Agents: Cross-Agent Compatibility in Specification-Driven Software Migration21 Aug 2026
- 2026Measuring What a Specification Determines: A Formal Semantic-Block Model and an Execution-Judged Benchmark19 Aug 2026
- 2026Token Optimization Strategies for LLM-Based Oracle-to-PostgreSQL Migration27 May 2026
Similar, not cited
Close in wording, no citation either way
- 2026Understanding by Reconstruction: Reversing the Software Development Process for LLM Pretraining
- 2025Lifecycle-Aware code generation: Leveraging Software Engineering Phases in LLMs
- 2026Code2LoRA: Hypernetwork-Generated Adapters for Code Language Models under Software Evolution
- 2026Diagnosing Knowledge Gaps in LLM Tool Use: An Agentic Benchmark for Novel API Acquisition
- 2026RepoZero: Can LLMs Generate a Code Repository from Scratch?
- 2026When LLMs Lag Behind: Knowledge Conflicts from Evolving APIs in Code Generation
- 2025LLM Assisted Coding with Metamorphic Specification Mutation Agent
- 2026CodeAlchemy: Synthetic Code Rewriting at Scale