aboutsummaryrefslogtreecommitdiff
path: root/common.mli
blob: a62b083b1cf5be125c52e01757f5584b4989e1ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(*
 * UPEM / L3 / Functional programming / Project: URM
 * Pacien TRAN-GIRARD, Adam NAILI
 *)

type line = int
type regidx = int
type regval = int
type reg = Reg of regidx * regval

type urmcmd =
  | Copy of regidx * regidx
  | Jump of regidx * regidx * line
  | Succ of regidx
  | Zero of regidx

type instptr = InstPtr of (line * urmcmd) list * (line * urmcmd) list

type urm = {
  instptr : instptr;
  regs : reg list
}

exception Syntax_error