A high-level language for writing distributed algorithms