Pysvf is a Python binding for the SVF (Static Value-Flow), a static analysis framework built on LLVM.
Pysvf can be installed in two ways:
- Python 3.8 - 3.11
- OS: Linux X86-64, Linux Arm64, MacOS
python3 -m pip install -i https://test.pypi.org/simple/ pysvf
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.
Documentation is available on the SVF-Python Wiki:
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.
- 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.