source: Deliverables/D2.2/8051/src/ERTL/ERTLToLTLI.mli @ 1585

Last change on this file since 1585 was 486, checked in by ayache, 9 years ago

Deliverable D2.2

File size: 1.3 KB
Line 
1
2(** This module is the central part of the translation of [ERTL]
3    programs into [LTL] programs. *)
4
5(* Pasted from Pottier's PP compiler *)
6
7(* This module translates [ERTL] statements into [LTL] statements. It is
8   parameterized over a module [Env], whose signature appears below, which
9   provides support for mapping pseudo-registers to stack slots or hardware
10   registers and for generating instructions (which requires allocating fresh
11   control flow graph labels). *)
12
13type decision =
14  | Spill of AST.immediate
15  | Color of I8051.register
16
17module Make (Env : sig
18
19  val lookup: Register.t -> decision
20
21  (* [generate instruction] returns a fresh instruction label, which
22     it associates with [instruction] in the control flow graph. *)
23
24  val generate: LTL.statement -> Label.t
25
26  val fresh_label: unit -> Label.t
27
28  val add_graph: Label.t -> LTL.statement -> unit
29
30  val locals: int
31
32  val stacksize: int
33
34             end) : sig
35
36  (* [translate_statement] turns a [ERTL] statement into a [LTL] statement, or
37     sequence of statements, that transfers control to the same label(s).
38
39     Existing statement labels are preserved, that is, the labels in
40     the new control flow graph form a superset of the labels in the
41     existing control flow graph. *)
42
43  val translate_statement: ERTL.statement -> LTL.statement
44
45end
46
Note: See TracBrowser for help on using the repository browser.