This is the Algorithm for BFS of call graph from target back and then forward to limit state space.