All Projects → seahorn → clam

seahorn / clam

Licence: Apache-2.0 license
Static Analyzer for LLVM bitcode based on Abstract Interpretation

Programming Languages

c
50402 projects - #5 most used programming language
C++
36643 projects - #6 most used programming language
CMake
9771 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to clam

progge.rs
Program analysis playground for a simple, imperative language
Stars: ✭ 29 (-83.89%)
Mutual labels:  llvm, static-analysis, program-analysis, abstract-interpretation
Seahorn
SeaHorn Verification Framework
Stars: ✭ 270 (+50%)
Mutual labels:  llvm, static-analysis, program-analysis
Crab Llvm
Static Analyzer for LLVM bitcode based on Abstract Interpretation
Stars: ✭ 143 (-20.56%)
Mutual labels:  llvm, static-analysis, program-analysis
Dg
[LLVM Static Slicer] Various program analyses, construction of dependence graphs and program slicing of LLVM bitcode.
Stars: ✭ 242 (+34.44%)
Mutual labels:  llvm, static-analysis, program-analysis
Pyre Check
Performant type-checking for python.
Stars: ✭ 5,716 (+3075.56%)
Mutual labels:  static-analysis, program-analysis, abstract-interpretation
Phasar
A LLVM-based static analysis framework.
Stars: ✭ 503 (+179.44%)
Mutual labels:  llvm, static-analysis, program-analysis
OCCAM
OCCAM: Object Culling and Concretization for Assurance Maximization
Stars: ✭ 20 (-88.89%)
Mutual labels:  llvm, static-analysis, abstract-interpretation
Codechecker
CodeChecker is an analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy
Stars: ✭ 1,209 (+571.67%)
Mutual labels:  llvm, static-analysis
Sea Dsa
A new context, field, and array-sensitive heap analysis for LLVM bitcode based on DSA.
Stars: ✭ 90 (-50%)
Mutual labels:  llvm, static-analysis
Sys
Sys: A Static/Symbolic Tool for Finding Good Bugs in Good (Browser) Code
Stars: ✭ 149 (-17.22%)
Mutual labels:  llvm, static-analysis
SCAF
A Speculation-Aware Collaborative Dependence Analysis Framework
Stars: ✭ 25 (-86.11%)
Mutual labels:  llvm, static-analysis
sturdy
Sturdy is a library for developing sound static analyses in Haskell.
Stars: ✭ 49 (-72.78%)
Mutual labels:  static-analysis, abstract-interpretation
iec-checker
Static analysis of IEC 61131-3 programs
Stars: ✭ 36 (-80%)
Mutual labels:  static-analysis, program-analysis
Cxxctp
DEPRECATED. USE INSTEAD github.com/blockspacer/flextool
Stars: ✭ 58 (-67.78%)
Mutual labels:  llvm, static-analysis
Stoat
STatic (LLVM) Object file Analysis Tool
Stars: ✭ 44 (-75.56%)
Mutual labels:  llvm, static-analysis
Domtresat
Dominator Tree LLVM Pass to Test Satisfiability
Stars: ✭ 42 (-76.67%)
Mutual labels:  llvm, static-analysis
Svf
Static Value-Flow Analysis Framework for Source Code
Stars: ✭ 540 (+200%)
Mutual labels:  llvm, static-analysis
klever
Read-only mirror of the Klever Git repository
Stars: ✭ 18 (-90%)
Mutual labels:  static-analysis, software-verification
Lyra
No description or website provided.
Stars: ✭ 23 (-87.22%)
Mutual labels:  static-analysis, abstract-interpretation
flextool
C++ compile-time programming (serialization, reflection, code modification, enum to string, better enum, enum to json, extend or parse language, etc.)
Stars: ✭ 32 (-82.22%)
Mutual labels:  llvm, static-analysis

Clam: Llvm front-end for Crab

llvm logocrab logo

Description

Clam is a static analyzer that computes inductive invariants for LLVM-based languages based on the Crab library. This branch supports LLVM 10.

The available documentation can be found in our wiki.

Docker

You can get the latest binary from Docker Hub (nightly built) using the command:

 docker pull seahorn/clam-llvm10:nightly

Requirements for compiling from sources

Clam is written in C++ and uses heavily the Boost library. The main requirements are:

  • Modern C++ compiler supporting c++14
  • Boost >= 1.65
  • GMP
  • MPFR (if -DCRAB_USE_APRON=ON or -DCRAB_USE_ELINA=ON)

In linux, you can install requirements typing the commands:

 sudo apt-get install libboost-all-dev libboost-program-options-dev
 sudo apt-get install libgmp-dev
 sudo apt-get install libmpfr-dev	

Clam provides a Python script called clam.py to interact with users. The simpler command is clam.py test.c. Type clam.py --help for all options. This script requires Python >= 3.6.

Tests

Testing infrastructure depends on several Python packages. To run tests you need to install lit and OutputCheck:

 pip3 install lit
 pip3 install OutputCheck

Compiling from sources and installation

The basic compilation steps are:

 mkdir build && cd build
 cmake -DCMAKE_INSTALL_PREFIX=_DIR_ ../
 cmake --build . --target crab && cmake ..
 cmake --build . --target llvm && cmake ..      
 cmake --build . --target install 

Clam provides several components that are installed via the extra target. These components can be used by other projects outside of Clam.

  • sea-dsa: git clone https://github.com/seahorn/sea-dsa.git

    sea-dsa is the heap analysis used to translate LLVM memory instructions. Details can be found here and here.

  • llvm-seahorn: git clone https://github.com/seahorn/llvm-seahorn.git

    llvm-seahorn provides specialized versions of InstCombine and IndVarSimplify LLVM passes as well as a LLVM pass to convert undefined values into nondeterministic calls.

The component sea-dsa is mandatory and llvm-seahorn is optional but highly recommended. To include these external components, type instead:

 mkdir build && cd build
 cmake -DCMAKE_INSTALL_PREFIX=_DIR_ ../
 cmake --build . --target extra            
 cmake --build . --target crab && cmake ..
 cmake --build . --target llvm && cmake ..           
 cmake --build . --target install 

The Boxes/Apron/Elina domains require third-party libraries. To avoid the burden to users who are not interested in those domains, the installation of the libraries is optional.

  • If you want to use the Boxes domain then add -DCRAB_USE_LDD=ON option.

  • If you want to use the Apron library domains then add -DCRAB_USE_APRON=ON option.

  • If you want to use the Elina library domains then add -DCRAB_USE_ELINA=ON option.

Important: Apron and Elina are currently not compatible so you cannot enable -DCRAB_USE_APRON=ON and -DCRAB_USE_ELINA=ON at the same time.

For instance, to install Clam with Boxes and Apron:

 mkdir build && cd build
 cmake -DCMAKE_INSTALL_PREFIX=_DIR_ -DCRAB_USE_LDD=ON -DCRAB_USE_APRON=ON ../
 cmake --build . --target extra                 
 cmake --build . --target crab && cmake ..
 cmake --build . --target ldd && cmake ..
 cmake --build . --target apron && cmake ..
 cmake --build . --target llvm && cmake ..                
 cmake --build . --target install 

Checking installation

To run some regression tests:

 cmake --build . --target test-simple
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].