Project

General

Profile

« Previous | Next » 

Revision 3b2bd83d

Added by Teme Kahsai about 8 years ago

updating to onera version 30f766a:2016-12-04

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
......
46 46
and clock_dec_desc =
47 47
  | Ckdec_any
48 48
  | Ckdec_bool of (ident * ident) list 
49
  | Ckdec_pclock of int * rat
49

  
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 *)
55 54
  | Const_array of constant list
56 55
  | Const_tag of label
57 56
  | Const_string of string (* used only for annotations *)
......
188 187
     nodei_stateless: bool;
189 188
     nodei_spec: node_annot option;
190 189
     nodei_prototype: string option;
191
     nodei_in_lib: string option;
190
     nodei_in_lib: string list;
192 191
    }
193 192

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

  
222

  
223
(************ Machine code types *************)
224

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

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

  
249

  
223 250
type error =
224 251
    Main_not_found
225 252
  | Main_wrong_kind

Also available in: Unified diff