-
Notifications
You must be signed in to change notification settings - Fork 31
SVFIR
bjjwwang edited this page Apr 30, 2024
·
13 revisions
- SVFIR is the demo program sample to understand SVFIR and their graph representations, i.e., ICFG and PAG
SVFIR/
|-- CMakeLists.txt
|-- SVFIR.cpp
`-- src
|-- swap.c
`-- example.c
* Before coding, please type cd $HOME/Software-Security-Analysis and git pull in your terminal to make sure you always have the latest version of the code template.

cd /home/SVF-tools/Software-Security-Analysis/SVFIR
clang -S -c -O0 -fno-discard-value-names -emit-llvm src/example.c -o example.ll
cd /home/SVF-tools/Software-Security-Analysis/CodeGraph
sh compile.sh src/example.c
The .ll file (i.e., example.ll) will be generated under the /home/SVF-tools/Software-Security-Analysis/CodeGraph folder
3.1 launch.json
You need to set the "program" to be the executable file of SVFIR, i.e., "${workspaceFolder}/bin/svfir" in
launch.json in order to run and debug
You need to set the "args" to be the .ll file you have just generated, i.e., "${workspaceFolder}/SVFIR/example.ll" in
launch.json in order to run and debug
- The two dot files (i.e,
example.ll.icfg.dotandexample.ll.pag.dot) will be generated under the/home/SVF-tools/Teaching-Software-Verification/SVFIRfolder

- Open the dot file under, for example,
/home/SVF-tools/Teaching-Software-Verification/SVFIR/example.ll.icfg.dotwhich is the ICFG of the program and call out the command palette

- Enter
Graphvizand select `Interactive Preview (beside)

- You will see the ICFG on the right hand side
