Score
Developing across C and C++ requires managing ABI/linkage and mixed-language builds (extern "C"), handling headers and linkage, using C idioms alongside C++ features (STL, templates, RAII), and configuring cross-compiler toolchains and build systems such as CMake for interoperable binaries.
Traditional compilers face limitations in development accessibility, optimization capabilities, and application scope. This work proposes the first multidimensional classification framework for large language model (LLM)-driven compilation, offering a systematic survey of existing research through four analytical dimensions: design philosophy, methodology, level of code abstraction, and task type. The study identifies three core design paradigms—Selector, Translator, and Generator—and highlights three transformative directions: democratizing compiler development, discovering novel optimization strategies, and expanding functional boundaries. It further argues that hybrid systems represent a critical pathway forward and provides a technical roadmap for building correct, scalable, and intelligent compilation tools.
Prior research on library migration has largely overlooked C/C++, leaving a critical gap in understanding its ecosystem’s evolution. Method: We construct the first large-scale, multi-source C/C++ library migration dataset, encompassing 19,943 projects across seven package managers, and conduct an empirical analysis integrating dependency graphs, commit histories, and issue trackers to systematically characterize migration behaviors, domains, and motivations—comparing findings against Python, JavaScript, and Java. Contribution/Results: We find C/C++ migrations concentrate in GUI, build-system, and OS development; 83.46% of source libraries map deterministically to a single target library; and unique drivers include reducing compilation time and unifying dependency management. Crucially, C/C++ migration patterns diverge significantly from dynamic languages (e.g., JS/Python) and Java—especially in domain distribution—demonstrating the dataset’s utility for developing specialized migration recommendation tools.
Automated build automation for C/C++ open-source projects faces core challenges including intricate dependency graphs, heterogeneous build systems (e.g., Make, CMake, Autotools, Bazel), diverse toolchains, and poor error resilience—areas where existing approaches offer limited support. To address these, we propose the first large language model (LLM)-based dynamic interactive build agent framework. It enables end-to-end adaptive build repair via implicit knowledge reasoning and closed-loop environmental feedback. We design a unified abstraction layer to support multiple build systems and integrate context-aware error diagnosis, intelligent retry mechanisms, and recovery strategies grounded in real-time build-state awareness. Evaluated on standard open-source benchmarks, our framework achieves a 78% build success rate; on the Top100 dataset, it outperforms manual builds on three projects and significantly improves overall build coverage. This work establishes a scalable, LLM-driven paradigm for C/C++ ecosystem build automation.
To address compilation redundancy, fragile dependencies, and inefficient builds caused by traditional C++ header-based interfaces in large-scale mathematical software, this paper proposes the first progressive C++20 module migration framework tailored for ultra-large scientific computing libraries—exemplified by deal.II (800K lines of code). Methodologically, we design a dual-mode (header/module) coexistence interface, customize the CMake build system, and develop a systematic compilation performance analysis toolchain. Our key contributions are: (1) a fine-grained, backward-compatible module partitioning strategy; (2) empirical validation that modularization reduces the library’s own compilation time by 37% on average, while downstream project compilation overhead shows no statistically significant change; and (3) the first established technical pathway and collaborative paradigm for scaling C++ modules across the scientific computing ecosystem.
Traditional compiler-based translation requires building a dedicated translator for each language pair, leading to exponential growth in complexity. This work proposes CrossGL—a unified intermediate representation (IR) supporting multi-paradigm semantic expression—and a modular, bidirectional translation system enabling efficient conversion among GPU compute languages including CUDA, HIP, and Metal. The pipeline performs lexical and syntactic analysis to generate an abstract syntax tree (AST), then employs a ToCrossGLConverter for frontend lowering and CodeGen for backend emission, integrating tools such as Slang into a complete compilation flow. CrossGL drastically reduces the engineering overhead of onboarding new languages and enables “write once, deploy anywhere” across heterogeneous GPU platforms. Experimental evaluation confirms successful compilation and correct execution across all supported backends in GPU computing, graphics rendering, and systems programming scenarios, advancing language-agnostic programming.
This work addresses the challenge of manually repairing implicit data loss compiler warnings in industrial-scale C++ projects by proposing an automated approach based on large language models (LLMs). The method leverages the Language Server Protocol and Tree-sitter to precisely extract code context, enabling intelligent decisions on whether range checks are necessary and generating performance-conscious repair code. As the first study to apply LLMs to this specific problem, the system achieves a 92.73% human-review acceptance rate on real-world projects, reduces auxiliary instruction overhead by 39.09% compared to baseline methods, and produces fixes whose runtime performance closely approximates that of optimal human-written solutions—differing by only 13.56%.
This work addresses the challenge of automated configuration migration across CI platforms—particularly from Travis CI to GitHub Actions—where manual translation is error-prone and labor-intensive. We propose an LLM-based translation framework grounded in empirical analysis of 811 real-world migration cases, enabling the first quantitative characterization of configuration conversion effort. We introduce a four-category taxonomy of translation problems and identify recurring developer pain points. Methodologically, we design a composite prompting strategy integrating documentation-guided instruction, iterative refinement, and in-context learning to enhance LLM robustness and fidelity. Evaluation on GPT-4o shows our approach achieves 75.5% end-to-end build success rate—nearly tripling the performance of baseline prompting—while substantially reducing manual intervention. The framework provides a reproducible, quantitatively evaluable pathway for intelligent CI/CD configuration migration.
This work addresses the unreliability of disassembly caused by the absence of compiler-intended semantic information in stripped binary executables. To overcome this limitation, the authors propose a novel lightweight metadata embedding mechanism that explicitly encodes critical semantics—such as code regions and memory boundaries—directly into the binary. This approach yields a decidable intermediate representation situated between raw binaries and source code. For the first time, it enables disassembly that is both decidable and recompilable, facilitating precise lifting to high-level intermediate representations. Experimental evaluation demonstrates that the embedded metadata incurs only 17% of the size overhead of DWARF debug information, introduces no runtime performance penalty, and successfully supports behavior-preserving binary lifting, instrumentation, and recompilation across a wide range of real-world C/C++ programs.
Existing patch transplantation methods struggle to address implicit inconsistencies across code repositories—such as branches and forks—due to their reliance on global code semantics rather than local context. This work proposes MIP, the first framework to systematically tackle this challenge by synergistically integrating large language models, compiler diagnostics, and static analysis. MIP dynamically selects between compiler feedback–driven repair or cross-repository semantic matching, depending on whether source identifiers are present in the target code, thereby enabling automatic resolution of implicit inconsistencies. Experimental results demonstrate that MIP successfully transplants more than twice as many patches as the best-performing baseline in both cross-branch and cross-fork scenarios, with its practical efficacy further validated through an industrial user study.
Cross-ISA program execution faces two fundamental challenges: poor performance of dynamic binary translation (DBT) and the infeasibility of full cross-compilation. This paper proposes a hybrid execution system that synergistically integrates compilation and simulation—departing from conventional all-translation or pure-simulation paradigms—by introducing a fine-grained, function-level offloading mechanism. Leveraging LLVM-based static analysis, the system automatically identifies offloadable functions; it then employs a customized QEMU-based inter-ISA calling interface and a lightweight runtime coordination protocol to enable efficient heterogeneous execution. The core innovations are automated, low-overhead function-level offloading decisions and robust cross-architecture function invocation support. Experimental evaluation demonstrates up to 13× speedup over state-of-the-art DBT systems, significantly reducing translation overhead while maintaining broad applicability and practical deployability.
Static analysis of C/C++ programs faces significant challenges due to pointer aliasing, multi-level indirection, function pointers, and type ambiguity induced by `typedef`. To address these, this paper proposes an end-to-end, compiler-agnostic, interprocedural, type-aware static analysis system. Methodologically, it leverages Clang LibTooling to construct a unified multi-view intermediate representation—integrating AST, CFG, and DFG—and introduces custom CFG/DFG construction algorithms alongside an alias-aware type inference module, enabling the first interprocedural, type-sensitive data-flow modeling. Contributions include: (1) statement-level control-flow and type-aware data-flow graph generation for uncompiled code; (2) empirical validation on real-world open-source projects demonstrating high-fidelity modeling of complex semantic dependencies; and (3) provision of interpretable, structurally enriched input representations for downstream software engineering tasks such as vulnerability detection and code completion.