Resource-aware program analysis using observation sequences