Adaptation of grammar based compression in detecting atomicity violations