TransForm: Theoretical Foundations of Transactional Memory