https://github.com/17451k/clade
Clade is a tool for extracting information about software build process and source code
https://github.com/17451k/clade
build-tool callgraph compilation-database source-code-analysis
Last synced: 9 days ago
JSON representation
Clade is a tool for extracting information about software build process and source code
- Host: GitHub
- URL: https://github.com/17451k/clade
- Owner: 17451k
- License: apache-2.0
- Created: 2018-06-13T11:48:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-12-18T09:26:58.000Z (over 2 years ago)
- Last Synced: 2026-01-05T09:38:48.664Z (3 months ago)
- Topics: build-tool, callgraph, compilation-database, source-code-analysis
- Language: Python
- Homepage:
- Size: 2.42 MB
- Stars: 22
- Watchers: 4
- Forks: 5
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/17451k/clade/actions?query=workflow%3Atest)
[](https://pypi.org/project/clade)
[](https://pypi.org/project/clade)
# Clade
Clade is a tool for intercepting build commands (stuff like compilation,
linking, mv, rm, and all other commands that are executed during build).
Intercepted commands can be parsed (to search for input and output files,
and options) and then used for various purposes:
- generating [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html);
- obtaining information about dependencies between source and object files;
- obtaining information about the source code (source code querying);
- generating function call graph;
- running software verification tools;
- visualization of all collected information;
- *and for much more*.
The interception of build commands is independent of the project type
and used programming languages.
However, all other functionality available in Clade **IS** dependent.
Currently only C projects are supported, but other languages and additional
functionality can be supported through the built-in *extension mechanism*.
## Prerequisites
An important part of Clade - a build commands intercepting library -
is written in C and it needs to be compiled before use.
It will be performed automatically at the installation stage, but you will
need to install some prerequisites beforehand:
- Python 3 (>=3.5)
- pip (Python package manager)
- cmake (>=3.3)
*Linux only*:
- make
- C **and** C++ compiler (gcc or clang)
- python3-dev (Ubuntu) or python3-devel (openSUSE) package
- gcc-multilib (Ubuntu) or gcc-32bit (openSUSE) package
to intercept build commands of projects leveraging multilib capabilities
*Windows only*:
- Microsoft Visual C++ Build Tools
Optional dependencies:
- For obtaining information about the C code you will need [CIF](https://github.com/17451k/cif)
installed. CIF is an interface to [Aspectator](https://github.com/17451k/aspectator) which in turn is a GCC
based tool that implements aspect-oriented programming for the C programming
language. You may download compiled CIF on [CIF releases](https://github.com/17451k/cif/releases) page.
- Graphviz for some visualization capabilities.
Clade works on Linux, macOS and partially on Windows.
## Hardware requirements
If you want to run Clade on a large project, like the Linux kernel,
you will need at least 16GB of RAM and 100GB of free disk space
for temporary files. The size of generated data will be approximately
10GB, so the space used for temporary files will be freed at the end.
Also several CPU cores are recommended, since in some cases Clade takes
twice as long time than a typical build process.
## Installation
To install the latest stable version just run the following command:
``` shell
python3 -m pip install clade
```
## Documentation
Following documentation is available:
* [Basic usage](docs/usage.md)
* [Available configuration options](docs/configuration.md)
* [Extensions](docs/extensions.md)
* [Scripts](docs/scripts.md)
* [Troubleshooting](docs/troubleshooting.md)
* [Development documentation](docs/dev.md)
You can also download an example of Clade output on the Linux kernel
(configuration tinyconfig) [from here](https://github.com/17451k/clade/suites/16820630511/artifacts/960641341) (around 40MB).
## Acknowledgments
Clade is inspired by the [Bear](https://github.com/rizsotto/Bear) project created by [László Nagy](https://github.com/rizsotto).