Transforming C++11 Code to C++03 to Support Legacy Compilation Environments
- URL: http://arxiv.org/abs/2405.07204v1
- Date: Sun, 12 May 2024 08:02:21 GMT
- Title: Transforming C++11 Code to C++03 to Support Legacy Compilation Environments
- Authors: Gábor Antal, Dávid Havas, István Siket, Árpád Beszédes, Rudolf Ferenc, József Mihalicza,
- Abstract summary: We create a source code transformation framework to automatically backport code written according to the C++11 standard to its functionally equivalent C++03 variant.
This paper reports on the technical details of the transformation engine, and our experiences in applying it on two large industrial code bases and four open-source systems.
- Score: 1.6851123188451185
- License: http://creativecommons.org/licenses/by-nc-sa/4.0/
- Abstract: Newer technologies - programming languages, environments, libraries - change very rapidly. However, various internal and external constraints often prevent projects from quickly adopting to these changes. Customers may require specific platform compatibility from a software vendor, for example. In this work, we deal with such an issue in the context of the C++ programming language. Our industrial partner is required to use SDKs that support only older C++ language editions. They, however, would like to allow their developers to use the newest language constructs in their code. To address this problem, we created a source code transformation framework to automatically backport source code written according to the C++11 standard to its functionally equivalent C++03 variant. With our framework developers are free to exploit the latest language features, while production code is still built by using a restricted set of available language constructs. This paper reports on the technical details of the transformation engine, and our experiences in applying it on two large industrial code bases and four open-source systems. Our solution is freely available and open-source.
Related papers
- Experience converting a large mathematical software package written in C++ to C++20 modules [0.0]
I describe an approach that allows providing both header-based and module-based interfaces from the same code base.<n>Conversion to modules is possible, resulting in a reduction in compile time for the converted library itself.<n>I end with thoughts about long-term strategies for converting the entire ecosystem of mathematical software.
arXiv Detail & Related papers (2025-06-26T17:38:33Z) - CodeRosetta: Pushing the Boundaries of Unsupervised Code Translation for Parallel Programming [15.391781573025787]
We introduce CodeRosetta, an encoder-decoder model designed specifically for translating between programming languages and their HPC extensions.
CodeRosetta is evaluated on C++ to parallel C++ translation tasks.
Our results show that CodeRosetta outperforms state-of-the-art baselines in C++ to translation.
arXiv Detail & Related papers (2024-10-27T17:34:07Z) - CodeGRAG: Bridging the Gap between Natural Language and Programming Language via Graphical Retrieval Augmented Generation [58.84212778960507]
We propose CodeGRAG, a Graphical Retrieval Augmented Code Generation framework to enhance the performance of LLMs.
CodeGRAG builds the graphical view of code blocks based on the control flow and data flow of them to fill the gap between programming languages and natural language.
Various experiments and ablations are done on four datasets including both the C++ and python languages to validate the hard meta-graph prompt, the soft prompting technique, and the effectiveness of the objectives for pretrained GNN expert.
arXiv Detail & Related papers (2024-05-03T02:48:55Z) - CMULAB: An Open-Source Framework for Training and Deployment of Natural Language Processing Models [59.91221728187576]
This paper introduces the CMU Linguistic Linguistic Backend, an open-source framework that simplifies model deployment and continuous human-in-the-loop fine-tuning of NLP models.
CMULAB enables users to leverage the power of multilingual models to quickly adapt and extend existing tools for speech recognition, OCR, translation, and syntactic analysis to new languages.
arXiv Detail & Related papers (2024-04-03T02:21:46Z) - IRCoder: Intermediate Representations Make Language Models Robust Multilingual Code Generators [49.903001442804594]
This work investigates the prospect of leveraging compiler intermediate representations (IR) to improve the multilingual capabilities of Code-LMs.
We first compile SLTrans, a parallel dataset consisting of nearly 4M self-contained source code files.
Next, we carry out continued causal language modelling training on SLTrans, forcing the Code-LMs to learn the IR language.
Our resulting models, dubbed IRCoder, display sizeable and consistent gains across a wide variety of code generation tasks and metrics.
arXiv Detail & Related papers (2024-03-06T17:52:08Z) - Creation of a CS1 Course with Modern C++ Principles [0.30458514384586394]
This poster contains experiences in designing a CS1 course that uses the C++ programming language.
Our goals were to prevent many common bad habits among C++ programmers.
arXiv Detail & Related papers (2023-11-13T23:43:38Z) - Parsing Fortran-77 with proprietary extensions [0.0]
Many organizations still rely on old code written in "obsolete" programming languages.
One difficulty of working with these "veteran languages" is being able to parse the source code to build a representation of it.
arXiv Detail & Related papers (2023-09-05T07:54:02Z) - Multilingual Code Co-Evolution Using Large Language Models [45.083171710527985]
Translating code changes from one programming language to another is not the way developers work.
Codeditor explicitly models code changes as edit and learns to correlate changes across programming languages.
Codeditor outperforms the state-of-the-art approaches by a large margin on all commonly used automatic metrics.
arXiv Detail & Related papers (2023-07-27T16:37:30Z) - CodeTF: One-stop Transformer Library for State-of-the-art Code LLM [72.1638273937025]
We present CodeTF, an open-source Transformer-based library for state-of-the-art Code LLMs and code intelligence.
Our library supports a collection of pretrained Code LLM models and popular code benchmarks.
We hope CodeTF is able to bridge the gap between machine learning/generative AI and software engineering.
arXiv Detail & Related papers (2023-05-31T05:24:48Z) - CodeGeeX: A Pre-Trained Model for Code Generation with Multilingual Benchmarking on HumanEval-X [50.008474888951525]
We introduce CodeGeeX, a multilingual model with 13 billion parameters for code generation.
CodeGeeX is pre-trained on 850 billion tokens of 23 programming languages.
arXiv Detail & Related papers (2023-03-30T17:34:01Z) - ANGLEr: A Next-Generation Natural Language Exploratory Framework [0.0]
The proposed design is being used for implementation of a new natural language processing framework, called ANGLEr.
The main parts of the proposed framework consist of (a) a pluggable Docker-based architecture, (b) a general data model, and (c) APIs description along with the graphical user interface.
arXiv Detail & Related papers (2022-05-10T13:32:13Z) - A Systematic Evaluation of Large Language Models of Code [88.34057460577957]
Large language models (LMs) of code have recently shown tremendous promise in completing code and synthesizing code from natural language descriptions.
The current state-of-the-art code LMs are not publicly available, leaving many questions about their model and data design decisions.
Although Codex is not open-source, we find that existing open-source models do achieve close results in some programming languages.
We release a new model, PolyCoder, with 2.7B parameters based on the GPT-2 architecture, which was trained on 249GB of code across 12 programming languages on a single machine.
arXiv Detail & Related papers (2022-02-26T15:53:55Z) - Unsupervised Translation of Programming Languages [19.56070393390029]
A transcompiler, also known as source-to-source, is a system that converts source code from a high-level programming language to another.
We train our model on source code from open source GitHub projects, and show that it can translate functions between C++, Java, and Python with high accuracy.
arXiv Detail & Related papers (2020-06-05T15:28:01Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.