Skip to content

specs-feup/clava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clava

Clava is a C/C++/CUDA/OpenCL source-to-source compiler. It applies analysis and transformations written in TypeScript/JavaScript scripts.

If you have used Clava, please consider filling the Clava User Experience Feedback form (it's short, really!)

Installing

Clava is currently distributed as an NPM package. Please check the Clava template repository for instructions on how to run Clava.

To call Clava from within CMake, please click here.

To build the Java part of Clava, please check the ClavaWeaver project folder. The JAR can be used to generate configuration files.

Compatibility

Currently Clava requires Java 17 and Node 18 or 20.

Although Clava is mainly a Java program, which should run on any compatible Java runtime, it also uses compiled binaries. These have operating system restrictions. Currently Clava is supported in Windows 10, Ubuntu 20.04, CentOS 7 and MacOS 11 (Big Sur).

Quickstart

Clava Web-based Tutorial - 2022 - Tutorial on how to use Clava, based on the online demo version.

Language Specification - List of all join points, attributes and actions available in Clava.

API Documentation - List of LARA APIs available in Clava.

API Slides - Introduction to Clava and the LARA Framework APIs.

For a sample of Clava examples, please check the Unit Tests.

Sample of supported transformations

Clava already supports the following transformations:

Troubleshooting

Error 'Invalid or corrupt jarfile'

Check if you have at least Java 17 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