Hück, Alexander ; Utke, Jean ; Bischof, Christian (2016)
Source Transformation of C++ Codes for Compatibility with Operator Overloading.
In: Procedia Computer Science, 80
doi: 10.1016/j.procs.2016.05.470
Artikel, Bibliographie
Kurzbeschreibung (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.
Typ des Eintrags: | Artikel |
---|---|
Erschienen: | 2016 |
Autor(en): | Hück, Alexander ; Utke, Jean ; Bischof, Christian |
Art des Eintrags: | Bibliographie |
Titel: | Source Transformation of C++ Codes for Compatibility with Operator Overloading |
Sprache: | Englisch |
Publikationsjahr: | 2016 |
Titel der Zeitschrift, Zeitung oder Schriftenreihe: | Procedia Computer Science |
Jahrgang/Volume einer Zeitschrift: | 80 |
DOI: | 10.1016/j.procs.2016.05.470 |
Kurzbeschreibung (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. |
Freie Schlagworte: | C++, Type Change, Static Analysis, Source Transformation, Operator Overloading, Algorithmic Differentiation |
Fachbereich(e)/-gebiet(e): | 20 Fachbereich Informatik 20 Fachbereich Informatik > Scientific Computing Zentrale Einrichtungen Zentrale Einrichtungen > Hochschulrechenzentrum (HRZ) Zentrale Einrichtungen > Hochschulrechenzentrum (HRZ) > Hochleistungsrechner |
Hinterlegungsdatum: | 02 Jun 2016 12:18 |
Letzte Änderung: | 07 Jan 2021 10:05 |
PPN: | |
Export: | |
Suche nach Titel in: | TUfind oder in Google |
Frage zum Eintrag |
Optionen (nur für Redakteure)
Redaktionelle Details anzeigen |