source: src/RTLabs/syntax.ma @ 1307

Last change on this file since 1307 was 1307, checked in by mulligan, 8 years ago

adding translate_cst

File size: 1.8 KB
Line 
1include "basics/logic.ma".
2
3include "common/AST.ma".
4include "common/CostLabel.ma".
5include "common/FrontEndOps.ma".
6include "common/Registers.ma".
7
8include "ASM/Vector.ma".
9include "common/Graphs.ma".
10
11inductive statement : Type[0] ≝
12| St_skip : label → statement
13| St_cost : costlabel → label → statement
14| St_const : register → constant → label → statement
15| St_op1 : unary_operation → register → register → label → statement (* destination source *)
16| St_op2 : binary_operation → register → register → register → label → statement (* destination source1 source2 *)
17| St_load : memory_chunk → register → register → label → statement
18| St_store : memory_chunk → register → register → label → statement
19| St_call_id : ident → list register → option register → label → statement
20| St_call_ptr : register → list register → option register → label → statement
21| St_tailcall_id : ident → list register → statement
22| St_tailcall_ptr : register → list register → statement
23| St_cond : register → label → label → statement
24| St_jumptable : register → list label → statement
25| St_return : statement
26.
27
28record internal_function : Type[0] ≝
29{ f_labgen    : universe LabelTag
30; f_reggen    : universe RegisterTag
31; f_result    : option (register × typ)
32; f_params    : list (register × typ)
33; f_locals    : list (register × typ)
34; f_stacksize : nat
35; f_graph     : graph statement
36; f_entry     : Σl:label. lookup ?? f_graph l ≠ None ?
37; f_exit      : Σl:label. lookup ?? f_graph l ≠ None ?
38}.
39
40(* Note that the global variables will be initialised by the code in main
41   by this stage, so the only initialisation data is the amount of space to
42   allocate. *)
43
44definition RTLabs_program ≝ program (λ_.fundef internal_function) nat.
Note: See TracBrowser for help on using the repository browser.