Project

General

Profile

Statistics
| Branch: | Tag: | Revision:

lustrec / src / machine_code_types.ml @ 8446bf03

History | View | Annotate | Download (923 Bytes)

1
(************ Machine code types *************)
2
open Lustre_types
3
  
4
type value_t =
5
  {
6
    value_desc: value_t_desc;
7
    value_type: Types.type_expr;
8
    value_annot: expr_annot option
9
  }
10
and value_t_desc =
11
  | Cst of constant
12
  | LocalVar of var_decl
13
  | StateVar of var_decl
14
  | Fun of ident * value_t list
15
  | Array of value_t list
16
  | Access of value_t * value_t
17
  | Power of value_t * value_t
18

    
19
type instr_t =
20
  {
21
    instr_desc: instr_t_desc; (* main data: the content *)
22
    (* lustre_expr: expr option; (* possible representation as a lustre expression *) *)
23
    lustre_eq: eq option;     (* possible representation as a lustre flow equation *)
24
  }
25
and instr_t_desc =
26
  | MLocalAssign of var_decl * value_t
27
  | MStateAssign of var_decl * value_t
28
  | MReset of ident
29
  | MNoReset of ident
30
  | MStep of var_decl list * ident * value_t list
31
  | MBranch of value_t * (label * instr_t list) list
32
  | MComment of string