• DocumentCode
    3727293
  • Title

    Tool for detecting standardwise differences in C++ legacy code

  • Author

    Tibor Brunner;Norbert Pataki;Zoltan Porkolab

  • Author_Institution
    Department of Programming Languages and Compilers, E?tv?s Lor?nd University P?zm?ny P?ter s?t?ny 1/C H-1117 Budapest, Hungary
  • fYear
    2015
  • Firstpage
    57
  • Lastpage
    62
  • Abstract
    Programming languages are continuously evolving as the experiences are accumulated, developers face new problems and other requirements such as increasing support for multi-threading is emerging. These changes are reflected in new language standards and compiler versions. Although these changes are carefully planned to keep reverse compatibility with previous versions to keep the syntax and the semantics of earlier written code, sometimes languages break this rule. In case of silent semantic changes, when the earlier written code is recompiled with the new version, this is especially harmful. The new C++11 standard introduced major changes in the core language. This changes are widely believed to be reverse compatible, i.e. a simple recompilation of earlier written code will keep the old semantics. Recently we found examples that the backward compatibility between language versions is broken. The previously written code compiled with a new C++ compiler may change the program behaviour without any compiler diagnostic message. In a large code base such issues are very hard to catch by manual inspection, therefore some automatic tool support is required for this purpose. In this paper we propose a tool support to detect such backward incompatibilities in C++. The basic idea is to parse the source code using different standards, and then compare the abstract syntax trees. We implemented a proof of concept prototype tool to demonstrate our idea based on the LLVM/Clang compiler infrastructure.
  • Keywords
    "Standards","Semantics","Computer languages","Program processors","Syntactics","Libraries","Prototypes"
  • Publisher
    ieee
  • Conference_Titel
    Scientific Conference on Informatics, 2015 IEEE 13th International
  • Print_ISBN
    978-1-4673-9867-1
  • Type

    conf

  • DOI
    10.1109/Informatics.2015.7377808
  • Filename
    7377808