Project

General

Profile

Revision 53206908 src/lustreSpec.ml

View differences:

src/lustreSpec.ml
24 24
  | Tydec_any
25 25
  | Tydec_int
26 26
  | Tydec_real
27
  | Tydec_float
27
  (* | Tydec_float *)
28 28
  | Tydec_bool
29 29
  | Tydec_clock of type_dec_desc
30 30
  | Tydec_const of ident
......
50 50

  
51 51
type constant =
52 52
  | Const_int of int
53
  | Const_real of string
54
  | Const_float of float
53
  | Const_real of Num.num * int * string (* (a,b, c) means a * 10^-b. c is the original string *)
54
  (* | Const_float of float *)
55 55
  | Const_array of constant list
56 56
  | Const_tag of label
57 57
  | Const_string of string (* used only for annotations *)
......
75 75
    is mutable (and initialized to dummy values). This avoids to have to
76 76
    duplicate ast structures (e.g. ast, typed_ast, clocked_ast). *)
77 77

  
78

  
79

  
80 78
(* The tag of an expression is a unique identifier used to distinguish
81 79
   different instances of the same node *)
82 80
and expr =
......
188 186
     nodei_stateless: bool;
189 187
     nodei_spec: node_annot option;
190 188
     nodei_prototype: string option;
191
     nodei_in_lib: string option;
189
     nodei_in_lib: string list;
192 190
    }
193 191

  
194 192
type const_desc = 
......
220 218
  * (top_decl list) 
221 219
  * bool (* is stateful *)
222 220

  
221

  
222
(************ Machine code types *************)
223

  
224
type value_t = 
225
  {
226
    value_desc: value_t_desc;
227
    value_type: Types.type_expr;
228
    value_annot: expr_annot option
229
  }
230
and value_t_desc =
231
  | Cst of constant
232
  | LocalVar of var_decl
233
  | StateVar of var_decl
234
  | Fun of ident * value_t list 
235
  | Array of value_t list
236
  | Access of value_t * value_t
237
  | Power of value_t * value_t
238

  
239
type instr_t =
240
  | MLocalAssign of var_decl * value_t
241
  | MStateAssign of var_decl * value_t
242
  | MReset of ident
243
  | MStep of var_decl list * ident * value_t list
244
  | MBranch of value_t * (label * instr_t list) list
245
  | MComment of string
246

  
247

  
223 248
type error =
224 249
    Main_not_found
225 250
  | Main_wrong_kind

Also available in: Unified diff