fabiodrg / clava

C/C++ Source-to-Source Tool based on Clang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clava

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!)

Quickstart

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.

Resources

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.

Troubleshooting

Error 'Invalid or corrupt jarfile'

Check if you have at least Java 11 installed, this is the minimum version.

Error 'missing libtinfo.so.5'

On Fedora >28 systems this can be solved by installing the package ncurses-compat-libs

Error 'cannot find -lz'

Install libz package (e.g., in Ubuntu sudo apt-get install libz-dev)

Citing Clava

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]

Acknowledgments

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.

Contacts

João Bispo

About

C/C++ Source-to-Source Tool based on Clang

License:Apache License 2.0


Languages

Language:Java 72.2%Language:C 16.7%Language:C++ 8.0%Language:Makefile 1.5%Language:CMake 1.0%Language:JavaScript 0.2%Language:Cuda 0.2%Language:Shell 0.1%Language:Batchfile 0.0%