Dynamic Invariant Generation For Concurrent Programs