A type and effect system for deterministic parallel Java