Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / backends / Ada / ada_backend_adb.ml @ 48a6309c

History | View | Annotate | Download (1.4 KB)

1
(********************************************************************)
2
(*                                                                  *)
3
(*  The LustreC compiler toolset   /  The LustreC Development Team  *)
4
(*  Copyright 2012 -    --   ONERA - CNRS - INPT - ISAE-SUPAERO     *)
5
(*                                                                  *)
6
(*  LustreC is free software, distributed WITHOUT ANY WARRANTY      *)
7
(*  under the terms of the GNU Lesser General Public License        *)
8
(*  version 2.1.                                                    *)
9
(*                                                                  *)
10
(********************************************************************)
11

    
12
open Format
13
open Machine_code_types
14
open Lustre_types
15
open Corelang
16
open Machine_code_common
17

    
18
module Main =
19
struct
20

    
21
(*TODO: Copied from ./ada_backend_ads.ml *)
22
let pp_package_name fmt machine =
23
  fprintf fmt "%s" machine.mname.node_id
24
let pp_begin_package fmt machine =
25
  fprintf fmt "package body %a is" pp_package_name machine
26
let pp_end_package fmt machine =
27
  fprintf fmt "end %a;" pp_package_name machine
28

    
29
let pp_machine_instr machine fmt instr =
30
    fprintf fmt "instruction"
31

    
32
let print fmt machine =
33
  let pp_instr = pp_machine_instr machine in
34
  fprintf fmt "@[<v 2>%a@,%a@]@,%a@."
35
    pp_begin_package machine
36
    (Utils.fprintf_list ~sep:"@," pp_instr) machine.mstep.step_instrs
37
    pp_end_package machine
38

    
39
end