Skip to content

Lab Exercise 2

Yulei Sui edited this page May 1, 2024 · 26 revisions

Lab-Exercise-2 folder layout

$tree Lab-Exercise-2
├── Z3ExampleMgr.cpp
├── Z3ExampleMgr.h
├── Z3Mgr.cpp
├── Z3Mgr.h
├── CMakeLists.txt
├── test.cpp

1. Get the latest lab-2 code template

* 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 before each assignment.

If git pull fails due to the conflict with your local changes, type git stash to store your current code in a temporal branch and type git pull again. If you want to retrieve your code back, type git stash pop.

Make sure to switch your program to z3mgr before coding.

2. Lab Exercise 2 task

  1. Implement methods from Z3ExampleMgr::test1() to Z3ExampleMgr::test7() in class Z3ExampleMgr in Z3Mgr.cpp
  2. Pass the test without any assertion by test.cpp.
  3. Submit Z3Mgr.cpp to canvas. Your implementation will be evaluated against our 7 internal tests. You will get the full marks if your code can pass them all. We have provided Z3ExampleMgr::test0() in Test3.cpp as an example to help get started.

*You will be working on Z3Mgr.cpp only and there is NO need to modify other files under the Assignment-3 folder

SVF Z3Mgr APIs to help with your implementation SVF Z3Mgr API.

3. visualize ICFG and Debugging

Visualize ICFG by following here

You can debug by printing all the values of all expressions using printExprValues() method in Z3ExampleMgr class.

Clone this wiki locally