Modular Shape Analysis for Dynamically Encapsulated Programs

  • Noam Rinetzky ,
  • A. Poetzsch-Heffter ,
  • ,
  • Mooly Sagiv ,
  • Eran Yahav

Proceedings of the 16th European Symposium on Programming (ESOP) |

We present a modular static analysis which identifies structural (shape) invariants for a subset of heap-manipulating programs. The subset is defined by means of a non-standard operational semantics which places certain restrictions on aliasing and sharing across modules. More specifically, we assume that live references (i.e., used before set) between subheaps manipulated by different modules form a tree. We develop a conservative static analysis algorithm by abstract interpretation of our non-standard semantics. Our modular algorithm also ensures that the program obeys the above mentioned restrictions.