(* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/. *) type register = Common.register let show (r : register) : string = match r with | X -> "X" | T -> "T" | F -> "F" | M -> "M" let pp ppf t = Format.fprintf ppf "%s" (show t) let equal (r1 : register) (r2 : register) = match (r1, r2) with | X, X -> true | T, T -> true | F, F -> true | M, M -> true | _ -> false type r_n = Common.r_n let show_r_n (rn : r_n) : string = match rn with | R t -> show t | N i -> string_of_int i let pp_r_n ppf rn = Format.fprintf ppf "%s" (show rn) let equal_r_n (rn1 : r_n) (rn2 : r_n) = match (rn1, rn2) with | R r1, R r2 -> equal r1 r2 | N n1, N n2 -> Int.equal n1 n2 | _ -> false