Module 4 – Static and Dynamic Analysis

Contact: Björn Lisper

The course module aims to give an overview of static and dynamic program analysis, with some hands-­on exercises to give practical experience of the techniques. After having taken the module the student should have an overall understanding how these techniques work, when they are applicable, how they relate to testing, and have knowledge of their respective strengths and weaknesses.

The module has two parts: static analysis, and dynamic analysis. The part on static analysis is examined through a hands-on exercise, where you are supposed to write a short report on your findings, and an assignment with some problems to solve where the solutions are to be sent in. The part on dynamic analysis is examined through a hands-on exercise with a short report.

You will have the opportunity to do the hands-on exercises at the final campus day, May 29th. We will provide lab computers where the tools to be used are pre-installed, and there will be an instructor available. We recommend that you use this opportunity. If you prefer to do the exercises by yourself, or if you want to start before the campus day, then it is possible to download the tools and install on your own computer (however note that the tool “Valgrind” only runs under linux). Directions for how to download the tools can be found in the instructions for the hands-on exercises.

Lab reports, and solutions to the assignment are to be sent to Björn Lisper.

The lectures for this module can also be found at the Scalable Learning website.

Static analysis

  1. (Video) Lecture 1: Introduction
  2. (Video) Lecture 2: Safety, and Relation to Testing
  3. (Video) Lecture 3: Different Kinds of Static Analysis
  4. (Video) Lecture 4: Dataflow Analysis
  5. (Video) Lecture 5: Basics of Value Analysis
  6. (Video) Lecture 6: An Interval Analysis Example
  7. (Video) Lecture 7: Tuning Value Analysis
  8. (Lab assignment) Astrée Hands-on Exercise
  9. (Assignment) Assignment with Static Analysis Problems (revised 2015-05-26)
  10. Additional Reading
    • Emanuelsson, P. and Nilsson, U. A Comparative Study of Industrial Static Analysis Tools. Electronic Notes in Theoretical Computer Science, 217:5-21, 2008. This study compares three commonly used commercial tools for static program analysis. The study is a couple of years old, but still provides interesting information how static analysis tools behave in practice.
    • Wögerer, W. A Survey of Static Program Analysis Techniques. Report, Vienna University of Technology, Oct. 2005. This is a tutorial that explains, in some more depth than the lectures, the basics of data flow analysis, value analysis by abstract interpretation, and symbolic execution. (The latter is an interesting technique that we have not covered in the lectures.)

Dynamic analysis

  1. (Video) Lecture 8: Introduction
  2. (Video) Lecture 9: Implementing Dynamic Analysis
  3. (Video) Lecture 10: Valgrind
  4. (Video) Lecture 11: Memcheck
  5. (Lab assignment) Valgrind/Memcheck Hands-on Exercise
  6. Additional Reading
    • Gosain, A. and Sharma, G. A Survey of Dynamic Program Analysis Techniques and Tools. In Proc. 3rd International Conference on Frontiers of Intelligent Computing: Theory and Applications (FICTA 2014), Advances in Intelligent Systems and Computing vol. 327, pp. 113-122, 2015. Springer International Publishing. This is a recent survey of techniques and tools for dynamic program analysis.

Back to main page