TU Darmstadt / ULB / TUbiblio

Source Transformation of C++ Codes for Compatibility with Operator Overloading

Hück, Alexander and Utke, Jean and Bischof, Christian (2016):
Source Transformation of C++ Codes for Compatibility with Operator Overloading.
In: Procedia Computer Science, pp. 1485-1496, 80, ISSN 18770509,
[Online-Edition: http://dx.doi.org/10.1016/j.procs.2016.05.470],
[Article]

Abstract

In C++, new features and semantics can be added to an existing software package without sweeping code changes by introducing a user-defined type using operator overloading. This approach is used, for example, to add capabilities such as algorithmic differentiation. However, the introduction of operator overloading can cause a multitude of compilation errors. In a previous paper, we identified code constructs that cause a violation of the C++ language standard after a type change, and a tool called OO-Lint based on the Clang compiler that identifies these code constructs with lint-like messages. In this paper, we present an extension of this work that automatically transforms such problematic code constructs in order to make an existing code base compatible with a semantic augmentation through operator overloading. We applied our tool to the CFD software OpenFOAM and detected and transformed 23 instances of problematic code constructs in 160,000 lines of code. A significant amount of these root causes are included up to 425 times in other files causing a tremendous compiler error amplification. In addition, we show the significance of our work with a case study of the evolution of the ice flow modeling software ISSM, comparing a recent version which was manually type changed with a legacy version. The recent version shows no signs of problematic code constructs. In contrast, our tool detected and transformed a remarkable amount of issues in the legacy version that previously had to be manually located and fixed.

Item Type: Article
Erschienen: 2016
Creators: Hück, Alexander and Utke, Jean and Bischof, Christian
Title: Source Transformation of C++ Codes for Compatibility with Operator Overloading
Language: English
Abstract:

In C++, new features and semantics can be added to an existing software package without sweeping code changes by introducing a user-defined type using operator overloading. This approach is used, for example, to add capabilities such as algorithmic differentiation. However, the introduction of operator overloading can cause a multitude of compilation errors. In a previous paper, we identified code constructs that cause a violation of the C++ language standard after a type change, and a tool called OO-Lint based on the Clang compiler that identifies these code constructs with lint-like messages. In this paper, we present an extension of this work that automatically transforms such problematic code constructs in order to make an existing code base compatible with a semantic augmentation through operator overloading. We applied our tool to the CFD software OpenFOAM and detected and transformed 23 instances of problematic code constructs in 160,000 lines of code. A significant amount of these root causes are included up to 425 times in other files causing a tremendous compiler error amplification. In addition, we show the significance of our work with a case study of the evolution of the ice flow modeling software ISSM, comparing a recent version which was manually type changed with a legacy version. The recent version shows no signs of problematic code constructs. In contrast, our tool detected and transformed a remarkable amount of issues in the legacy version that previously had to be manually located and fixed.

Journal or Publication Title: Procedia Computer Science
Volume: 80
Uncontrolled Keywords: C++, Type Change, Static Analysis, Source Transformation, Operator Overloading, Algorithmic Differentiation
Divisions: 20 Department of Computer Science
20 Department of Computer Science > Scientific Computing
Zentrale Einrichtungen > University IT-Service and Computing Centre (HRZ) > Hochleistungsrechner
Zentrale Einrichtungen > University IT-Service and Computing Centre (HRZ)
Zentrale Einrichtungen
Date Deposited: 02 Jun 2016 12:18
Official URL: http://dx.doi.org/10.1016/j.procs.2016.05.470
Identification Number: doi:10.1016/j.procs.2016.05.470
Export:
Suche nach Titel in: TUfind oder in Google

Optionen (nur für Redakteure)

View Item View Item