Algorithmic techniques for predictive testing of concurrent programs and distributed systems