CS6843 Program Analysis

Mode: Contact course
Course description
Course faculty: Rupesh Nasre (rupesh0508@gmail.com).

Schedule
Assign 1: May 25
Assign 2: June 8
EndSem: June 24

Slides and Reading Material

Evaluation
Two assignments (66%), exam (34%)

Assign 1: Implement an analysis to find out if two functions commute. Two functions f1 and f2 commute if for some program state S, the effect of executing f1 followed by f2 is the same as that of executing f2 followed by f1 in the same state S. For instance, the following two functions commute for global variable x (ignoring end-conditions):

f1() {
  x = x + 1;
}
f2() {
  x = x - 1;
}
You have to create 10 simple test-cases. I will ask you for a demo. The program contains only global integers and two functions, arithmetic expressions with +-*/ and assignments. No if-else, no loops, no function calls, no arrays, no main, etc. Note that the expressions can be arbitrary, for instance, x * y - 3 / z + 5 and there could be multiple assignment statements in each function.

Assign 2: Implement an analysis to check if a lock-unlock region contains a loop, either directly or inside a transitively called function.

If you want to use C, you can use LLVM.
If you want to use Java, here is a link to the tools

Submit the code by email as a single tar-gzipped file containing only the code/files you wrote, by 23:59 of the deadline.

The final grading is as follows.
S: >= 95 + overall performance
A: >= 80
B: >= 70
C: >= 60
D: >= 50
E: >= 40