A Simple Runtime Invariant Miner
Summary
A detailed, tutorial-style post describing a Daikon-style runtime invariant miner implemented in Python. It covers instrumentation via sys.settrace to collect traces, generation and checking of unary and binary invariant templates, and suppression of redundant invariants. The article also introduces scoped program points, PairedTraceStore for pre/post relations, and relational invariants with paired observations, plus examples like triangle and sum_list, and discusses performance and limitations of dynamic invariant mining as an approximate oracle for regression testing.