INSTRUMENTATION OF C++ PROGRAMS USING AUTOMATIC SOURCE CODE TRANSFORMATIONS

Authors

  • Zsolt PARRAGI Eötvös Loránd University. Email: zsoltparragi@caesar.elte.hu
  • Zoltán PORKOLÁB Eötvös Loránd University. Email: gsd@elte.hu

DOI:

https://doi.org/10.24193/subbi.2018.2.04

Keywords:

C programming language, source code transformation, instrumentation.

Abstract

The main tool for programmers is always the compiler, but there are also many other tools to help the development process. Some of these tools work on the source code of the program, analyzing, measuring or transforming it. Implementing a source based tool is a complex task, especially for complex languages such as C++. In recent years the C++ language received an easy-to-use library for developing such software, in the form of clang tooling. However, this library only focuses on processing a single translational unit of the program, independently to the other parts of the build process. Tools which ignore this big picture could result in failures when used on larger projects, or incorrect runtime behavior. In this paper, we describe some of these challenges encountered in real-world C++ projects and propose possible solutions for future tools to fix or mitigate the issues.

Author Biographies

Zsolt PARRAGI, Eötvös Loránd University. Email: zsoltparragi@caesar.elte.hu

Department of Programming Languages and Compilers, Eötvös Loránd University. Email: zsoltparragi@caesar.elte.hu

Zoltán PORKOLÁB, Eötvös Loránd University. Email: gsd@elte.hu

Department of Programming Languages and Compilers, Eötvös Loránd University. Email: gsd@elte.hu

References

“An Empirical Analysis of C Preprocessor Use”. In: Software Engineering, IEEE Transactions on 28 (Jan. 2003), pp. 1146–1170.

boost. Boost C++ libraries. 2018. url: https://www.boost.org/ (visited on 03/31/2018).

FrogLogic. Coco coverage analysis tool. 2018. url: http://www.froglogic.com/coco (visited on 03/31/2018).

Alejandra Garrido and Ralph Johnson. “Challenges of Refactoring C Programs”. In: International Workshop on Principles of Software Evolution (IWPSE) (Jan. 2002), pp. 6–14.

GCC. gcov - A test coverage plarform. 2018. url: https://gcc.gnu.org/onlinedocs/gcc/Gcov.html (visited on 03/31/2018).

Google. Syzygy Transformation Toolchain. 2018. url: http://github.com/google/syzygy/ (visited on 03/31/2018).

ISO. “ISO/IEC 14882:2014 Information technology — Programming languages — C++”. In: Geneva, Switzerland: International Organization for Standardization, 2014.

Kitware. CMake. 2018. url: https://cmake.org (visited on 03/31/2018).

Nagy Laszlo. Build EAR. 2018. url: http://github.com/riszotto/Bear/ (visited on 03/31/2018).

LLVM. Clang Memory Sanitizer. 2018. url: https://clang-analyzer.llvm.org/ (visited on 03/31/2018).

LLVM. Clang Static Analyzer. 2018. url: https://clang-analyzer.llvm.org/ (visited on 03/31/2018).

pierricgimmig. Orbit Profiler. 2018. url: http://github.com/pierricgimmig/orbitprofiler/ (visited on 03/31/2018).

strace. strace. 2018. url: https://strace.io/ (visited on 03/31/2018).

Valgrind. Valgrind instrumentation framework. 2018. url: http://valgrind.org/ (visited on 03/31/2018).

Laszlo Vidacs. “ICSOFT 2009 - 4th International Conference on Software and Data Technologies, Proceedings”. In: vol. 1. Jan. 2009, pp. 232–237.

Daniel Waddington and Bin Yao. “High-fidelity C/C++ code transformation”. In: Science of Computer Programming 68.2 (2007). Special Issue on ETAPS 2005 Workshop on Language Descriptions, Tools, and Applications, pp. 64–78. issn: 0167-6423. url: http://www.sciencedirect.com/science/article/pii/S0167642307000718.

Downloads

Published

2018-12-28

How to Cite

PARRAGI, Z., & PORKOLÁB, Z. (2018). INSTRUMENTATION OF C++ PROGRAMS USING AUTOMATIC SOURCE CODE TRANSFORMATIONS. Studia Universitatis Babeș-Bolyai Informatica, 63(2), 53–65. https://doi.org/10.24193/subbi.2018.2.04

Issue

Section

Articles