Semantic Reduction of Thread Interleavings in Concurrent Programs -- Inferring