Rough draft for liveness analysis.

Still has some java type errors and some stupidly inefficient choices,
but is a first attempt.