1 |
230b168e
|
Guillaume DAVY
|
This is the Ada Backend generating Ada code from the machine code computed
|
2 |
|
|
from a Lustre file.
|
3 |
|
|
|
4 |
|
|
The backend is split in several files described in this README.
|
5 |
|
|
|
6 |
|
|
=> misc_lustre_function.ml
|
7 |
|
|
Some fonction on pure Lustre machine code, no printers
|
8 |
|
|
or anything related to Ada. It just compute information from the Machine Code.
|
9 |
|
|
It contains mostly the unification code used for polymorphic type. It is
|
10 |
|
|
important since the Arrow node is polymorphic.
|
11 |
|
|
|
12 |
|
|
=> misc_printer.ml
|
13 |
|
|
Some general format printer function, not related at all
|
14 |
|
|
to Ada but used by this backend.
|
15 |
|
|
|
16 |
|
|
=> ada_printer.mli
|
17 |
|
|
=> ada_printer.ml
|
18 |
|
|
It contains Type representing some part of Ada syntaxe and printers function
|
19 |
|
|
to generates it. There is nothing specifics to Lustre in this file. It is
|
20 |
|
|
mostly printers for the declarative part of Ada. The printer functions takes in
|
21 |
|
|
general directly printer function build by other files(like ada_backend_common.ml)
|
22 |
|
|
to print instruction and expression contained in the declaration.
|
23 |
|
|
For example, the printer for the declaration of a variable will take
|
24 |
|
|
two printer functions as argument:
|
25 |
|
|
- pp_type: printing the type
|
26 |
|
|
- pp_name: printing the variable name
|
27 |
|
|
The printer will looks like :
|
28 |
|
|
--
|
29 |
|
|
let pp_var_decl pp_type pp_name =
|
30 |
|
|
fprintf fmt "%t : %t" pp_type pp_name
|
31 |
|
|
--
|
32 |
|
|
|
33 |
|
|
=> ada_backend_common.mli
|
34 |
|
|
=> ada_backend_common.ml
|
35 |
|
|
It contains function printing Ada code(instruction and exression) from Machine
|
36 |
|
|
Code. This functions are used or could be used for ads and/or adb and/or
|
37 |
|
|
wrappers.
|
38 |
|
|
|
39 |
|
|
=> ada_backend_ads.ml
|
40 |
|
|
It contains function printing Ada code(instruction and exression) from Machine
|
41 |
|
|
Code for the Ads file.
|
42 |
|
|
|
43 |
|
|
=> ada_backend_adb.ml
|
44 |
|
|
It contains function printing Ada code(instruction and exression) from Machine
|
45 |
|
|
Code for the Adb file.
|
46 |
|
|
|
47 |
|
|
=> ada_backend_wrapper.ml
|
48 |
|
|
It contains function printing Ada code(instruction and exression) from Machine
|
49 |
|
|
Code for :
|
50 |
|
|
- an adb file witha main function containg a loop calling step.
|
51 |
|
|
- a project file
|
52 |
|
|
- a configuration file
|
53 |
|
|
|
54 |
|
|
=> ada_backend.ml
|
55 |
|
|
It contains the main function of the backend which perform the unification
|
56 |
|
|
and write all the files using the previsous code.
|
57 |
|
|
|