-
Notifications
You must be signed in to change notification settings - Fork 145
TIP exercises
- Implement the missing part (i.e. the
visitmethod) of theTypeAnalysisclass in the TIP implementation. (Hint: use pattern matching onnodeand invokeunifyfor the associated constraints.) Then test it on some relevant TIP programs. - Explain what happens in
UnionFindSolverandTypeAnalysisif analyzing a program with recursive types.
Implement your solution to SPA Exercise 3.21 (about TIP with arrays).
Implement a Scala method in the TIP project that can check whether an operation as defined in the absPlus, absMinus, etc. tables in SignLattice in SignLattice.scala is monotone. (Optional: add a test script to test that all the tables in SignLattice are monotone.)
Implement the missing parts in the localTransfer method in the SimpleSignAnalysis class. (Expected: 2 lines of code.)
Then test the analysis on some relevant TIP programs.
Implement the class PowersetLattice in GenericLattices.scala. (A simple solution requires only 2 lines of code.)
This code is needed for some of the exercises below.
Implement the missing parts in LiveVarsAnalysis, and test the analysis on some relevant TIP programs.
Implement the reaching definitions analysis (this can be done with around 50 lines of code), and test it on some relevant TIP programs.
Implement the very busy expressions analysis, and test it on some relevant TIP programs.
Implement and test the analysis from SPA Exercise 5.35.
Finish the implementation of the widenInterval method in IntervalAnalysisWidening. (Expected: 1 line of code.)
Them test the analysis on some relevant TIP programs.
Implement the two missing parts in InterprocValueAnalysisFunctions.
Notice that this implementation of value analysis uses the lifted abstract state lattice, where the bottom element represents "unreachable". (Thereby the lattice can also be used for context sensitive analysis.) So don't forget that the entry of the main function is always reachable, and that function exits may be unreachable.
To be able to run the analysis, you need to insert your solution from Exercise 4 into ValueAnalysisMisc.localTransfer (for variable declarations and assignments). With this in place, you can run for example SignAnalysis.Interprocedural.WorklistSolverWithReachability (using -sign iwlr from the command line).
ControlFlowAnalysis.scala contains a partial implementation of the control flow analysis for TIP, using CubicSolver. Implement the missing parts of ControlFlowAnalysis, and test it on some relevant TIP programs.
Implement the missing parts in AndersenAnalysis and test it on some relevant TIP programs.
Implement the missing parts in SteensgaardAnalysis and test it on some relevant TIP programs.