Added functions to calculate reachability as well as the corresponding tests.