Clava is a C/C++ source-to-source compiler. It applies analysis and transformations written in LARA scripts (which is based on JavaScript), and can be installed in under a minute.
If you have used Clava, please consider filling the Clava User Experience Feedback form (it's short, really!)
Introduction to Clava and the LARA Framework: Slides
Tutorial on how to use Clava (recommended parts 1-3): Clava Tutorial - 2018 PACT.
Start using LARA with examples: LARA Reference Guide.
For a sample of Clava examples, please check the Unit Tests.
A ZIP file with the compiled JAR for Clava can be downloaded from here.
There is an installation script for Linux that can be run locally and that will install the Clava binary in the script path (sudo is required for CMake module installation).
For an online demo version of Clava, please click here.
To call Clava from within CMake, please click here.
To build Clava, please check the ClavaWeaver project folder.
Check if you have at least Java 11 installed, this is the minimum version.
On Fedora >28 systems this can be solved by installing the package ncurses-compat-libs
Install libz package (e.g., in Ubuntu sudo apt-get install libz-dev
)
If you want to reference Clava in your work, please use the following publication:
João Bispo, and João MP Cardoso. Clava: C/C++ source-to-source compilation using LARA. SoftwareX, Volume 12, 2020, Article 100565. [ScienceDirect] [bibtex]
This work has been partially funded by the ANTAREX project through the EU H2020 FET-HPC program under grant no. 671623. João Bispo acknowledges the support provided by Fundação para a Ciência e a Tecnologia, Portugal, under Post-Doctoral grant SFRH/BPD/118211/2016.