1. A method, comprising: in a program of interest represented as a sequence of states comprising variables and flags wherein controls transition the program from state to state, wherein the program comprises tests at prescribed locations in the program that are applied upon specific states and generate observables, inserting at different points in the program hooks that capture program runtime behaviors constituting classification features; flattening the program states, commands and tests along a program run-time timeline; and identifying a root cause of a program failure by backtrack analyzing a stream of input states and commands and output consequent states, commands and test results to detect causal correlations between variables, states and commands.