Reproducible Testing of Concurrent Programs Based on Shared Variables