There was such a tool, called Purify.
https://web.stanford.edu/class/cs343/resources/purify.pdf
Purify was great until Rational bought it and jacked up the price 10x.