open Atomic open MachineDefTypes open MachineDefValue type p_thread_id = MachineDefTypes.thread_id type p_value = MachineDefValue.value type fence = | Lwsync | Hwsync | Ctrlisync type action = | Read of action_id * p_thread_id * address * p_value | Write of action_id * p_thread_id * address * p_value val is_read : action -> bool let is_read a = match a with | Read _ _ _ _ -> true | _ -> false end val is_write : action -> bool let is_write a = match a with | Write _ _ _ _ -> true | _ -> false end val get_thread : action -> p_thread_id let get_thread a = match a with | Read _ tid _ _ -> tid | Write _ tid _ _ -> tid end val get_address : action -> address let get_address a = match a with | Read _ _ a _ -> a | Write _ _ a _ -> a end val get_value : action -> p_value let get_value a = match a with | Read _ _ _ v -> v | Write _ _ _ v -> v end