Want to write a runtime data structure invariant check to find a bug, but can't stand the slowdown? Ditto will help. It automatically optimizes such checks so that they run 10x faster or more. PLDI 2007 paper http://www.cs.berkeley.edu/~aj/cs/ditto.pdf