Model Checking Recursive Programs Interacting via the Heap