diff options
Diffstat (limited to 'src/reg.mli')
-rw-r--r-- | src/reg.mli | 29 |
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 | |||
6 | open Common | ||
7 | |||
8 | (* Returns the index of a register. *) | ||
9 | val 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. *) | ||
15 | val 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. *) | ||
19 | val 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 *) | ||
23 | val regs_set : reg list -> regidx -> regval -> reg list | ||
24 | |||
25 | (* Sorts a list of registers in ascending index order *) | ||
26 | val regs_sort : reg list -> reg list | ||
27 | |||
28 | (* Returns the string representation of a register list. *) | ||
29 | val regs_string : reg list -> string | ||