Litcius/Paper detail

Clava: C/C++ source-to-source compilation using LARA

João Bispo, João M. P. Cardoso

2020SoftwareX31 citationsDOIOpen Access PDF

Abstract

This article presents Clava, a Clang-based source-to-source compiler, that accepts scripts written in LARA, a JavaScript-based DSL with special constructs for code queries, analysis and transformations. Clava improves Clang’s source-to-source capabilities by providing a more convenient and flexible way to analyze, transform and generate C/C++ code, and provides support for building strategies that capture run-time behavior. We present the Clava framework, its main capabilities, and how it can been used. Furthermore, we show that Clava is sufficiently robust to analyze, instrument and test a set of large C/C++ application codes, such as GCC.

Topics & Concepts

CompilerComputer scienceScripting languageSource codeProgramming languageJavaScriptDigital subscriber lineSet (abstract data type)Open sourceCode (set theory)Software engineeringOperating systemSoftwareTelecommunicationsAdvanced Software Engineering MethodologiesSoftware Engineering ResearchSoftware Testing and Debugging Techniques
Clava: C/C++ source-to-source compilation using LARA | Litcius