Skip to content

se-sic/vara-feature

Repository files navigation

VaRA feature library

Build Status Documentation Status

Installation

Installing the feature library simple. First, install the required dependencies:

sudo apt install llvm-dev libxml2-dev graphviz

Note: We advice to use newer version of LLVM to stay up-to-date with our improvements. If apt on your system does not support these out of the box visit apt.llvm.org.

Please also assure that you have cmake and make installed on your system. Otherwise, the build process will fail.

Second, setup the repository and build the vara-feature lib.

git clone https://github.com/se-sic/vara-feature
cd vara-feature
git submodule init && git submodule update --recursive
mkdir build && cd build
CC=clang CXX=clang++ cmake ..
cmake --build .

If you happen to have an older version of LLVM and cmake aborts, you can still use the LLVM_REQUESTED_VERSION accordingly. It may be required to specify the minor version of your LLVM. Adhere to the output of

  llvm-config --version

To set the version to version 16.0, for instance, you can use the following command:

CC=clang CXX=clang++ cmake -DLLVM_REQUESTED_VERSION=16.0 ..

To enable the support for Z3, you can use different flags. First, you will have to set the flag VARA_FEATURE_USE_Z3_SOLVER to True. If you have installed Z3 on your system, you can further set VARA_FEATURE_BUILD_Z3_SOLVER to False; otherwise, it will build the Z3 version that is pulled in by external/z3.

CC=clang CXX=clang++ cmake -DVARA_FEATURE_USE_Z3_SOLVER=True -DVARA_FEATURE_BUILD_Z3_SOLVER=False ..

Test Execution

To execute all unit tests you can use the following command in your build-directory:

cmake --build . --target check-vara-feature-unittests

Python bindings

The feature library offers python bindings for easier scripting. Currently, these bindings need to be installed locally like this.

  git clone https://github.com/se-sic/vara-feature.git
  cd vara-feature
  git submodule init && git submodule update --recursive
  pip3 install --user .

Development

All VaRA development is coordinated from the main VaRA repository. So, for issues, please visit the VaRA bugtracker and search for the FeatureLib tag. If you want to reference a issue, please use the full reference se-passau/VaRA#42.

Internal API documentation for vara-feature can be found here