8000 GitHub - SVF-tools/SVF-Python: Using SVF in Python Projects
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

SVF-tools/SVF-Python

Repository files navigation

Pysvf: Python Bindings for SVF

1. Introduction

Pysvf is a Python binding for the SVF (Static Value-Flow), a static analysis framework built on LLVM.

2. Installation

Pysvf can be installed in two ways:

Method 1: Install via pip (Test PyPI)

Requirements

  • Python 3.8 - 3.11
  • OS: Linux X86-64, Linux Arm64, MacOS

Install Command

python3 -m pip install -i https://test.pypi.org/simple/ pysvf

Method 2: Build from Source

Clone the repository and run the build script:

bash build.sh

This will build the SVF and its depedencies like LLVM and Z3, and set up the Python bindings.

3. Documentation

Documentation is available on the SVF-Python Wiki:

4. Tutorial

Example notebooks are provided in the tutorial folder. Before running them, please install Jupyter Notebook:

python3 -m pip install jupyter
cd demo
jupyter notebook

Then you can click one of the following notebooks.

Example Notebooks

  • PAG: Generate Program Assignment Graph (PAG / SVFIR) from LLVM BC files and manipulate PAGNode (SVFVar).
  • ICFG: Generate Interprocedural Control Flow Graph (ICFG) and manipulate ICFGNode, ICFGEdge, and subclasses.
  • SVFG: Generate Static Value Flow Graph (SVFG) and manipulate SVFGNode, SVFGEdge, and subclasses.

About

Using SVF in Python Projects

Resources

Stars

Watchers

Forks

Packages

No packages published
0