-
Notifications
You must be signed in to change notification settings - Fork 23
Assignment 1 CPP
Use control + ~
to open a terminal in VSCode and then type the below command line
Your implementation | ctest command line |
---|---|
Your reachability analysis | ctest -R ass1-icfg -VV |
Your points-to analysis | ctest -R ass1-pta -VV |
Your taint analysis | ctest -R ass1-taint -VV |
The entire Assignment-1 | ctest -R ass1 -VV |
Add -dump-icfg
as an extra option of -icfg
for your ass1
executable when debugging your reachability
implementation. This will dump ICFG into a dot file to view in VSCode.
Add -print-pts
as an extra option of -pta
for your ass1
executable when debugging your solveWorklist
implementation and you could print out the final points-to set of each node to validate your MAYALIAS and NOALIAS results. You could also use -print-constraint-graph
to print out the final constraint graph (edges and nodes) or -dump-constraint-graph
to dump it into a dot file to view in VSCode. Retrieve a variable's points-to set, perform union operations or print out the points-to set using these APIs
Constraint Edge | Corresponding Color in Dot graphs (PAG and ConstraintGraph) |
---|---|
ADDR | Green |
COPY | Black or (dashed arrow for interprocedural COPY edges) |
LOAD | Red |
STORE | Blue |
GEP | Purple |
- Upload
Assignment-1.cpp
to UNSWWebCMS
for your submission.
Your implementation will be evaluated against our 10 internal tests. You will get the full marks if your code can pass them all. Our internal tests are private. Here, we only provided a handful test cases under Assignment-1/Tests/testcases
. You are encouraged to add more test cases by yourself to validate the correctness of your implementation.
- You will be working on Assignment-1.cpp
only and there is NO need to modify other files under the Assignment-1 folder
3.1 launch.json
To enable debugging and running, switch your executable by setting the program
and args
fields as described here or follow the below screenshot.
From Configure-IDE, we know how to set breakpoint, debug and watch the variables.
If we want to check more complicated data structures like ICFG, ConstraintGraph and Point-to Sets. Please read the following instructions.
As per debugging-tips-for-icfg
As per debugging-tips-for-constraintgraph-and-points-to-sets