Lifetime analysis code