aboutsummaryrefslogtreecommitdiff
path: root/src/reg.mli
diff options
context:
space:
mode:
Diffstat (limited to 'src/reg.mli')
-rw-r--r--src/reg.mli29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/reg.mli b/src/reg.mli
new file mode 100644
index 0000000..6e81259
--- /dev/null
+++ b/src/reg.mli
@@ -0,0 +1,29 @@
1(*
2 * UPEM / L3 / Functional programming / Project: URM
3 * Pacien TRAN-GIRARD, Adam NAILI
4 *)
5
6open Common
7
8(* Returns the index of a register. *)
9val reg_idx : reg -> regidx
10
11(* Compares two register Ri and Rj.
12 * It returns an integer less than, equal to, or greater than zero if
13 * the first register index is respectively less than, equal to, or
14 * greater than the second register index. *)
15val reg_compar : reg -> reg -> int
16
17(* Returns the register value of a register from its index. Fails if
18 * there is not register with the sought register index. *)
19val regs_get : reg list -> regidx -> regval
20
21(* Set the value of the register to value,
22 * or creates it to the value specified if it does not exist *)
23val regs_set : reg list -> regidx -> regval -> reg list
24
25(* Sorts a list of registers in ascending index order *)
26val regs_sort : reg list -> reg list
27
28(* Returns the string representation of a register list. *)
29val regs_string : reg list -> string