Project

General

Profile

Revision ef34b4ae src/lustreSpec.ml

View differences:

src/lustreSpec.ml
32 32
  | Tydec_struct of (ident * type_dec_desc) list
33 33
  | Tydec_array of Dimension.dim_expr * type_dec_desc
34 34

  
35
type type_def =
36
  {
37
    ty_def_id: ident;
38
    ty_def_desc: type_dec_desc}
35
type typedec_desc =
36
    {tydec_id: ident}
37

  
38
type typedef_desc =
39
    {tydef_id: ident;
40
     tydef_desc: type_dec_desc}
39 41

  
40 42
type clock_dec =
41 43
    {ck_dec_desc: clock_dec_desc;
......
99 101
  | Expr_when of expr * ident * label
100 102
  | Expr_merge of ident * (label * expr) list
101 103
  | Expr_appl of call_t
102
 and call_t = ident * expr * (ident * label) option 
104

  
105
and call_t = ident * expr * (ident * label) option 
103 106
     (* The third part denotes the reseting clock label and value *)
104
and 
107

  
108
and eq =
109
    {eq_lhs: ident list;
110
     eq_rhs: expr;
111
     eq_loc: Location.t}
112

  
105 113
  (* The tag of an expression is a unique identifier used to distinguish
106 114
     different instances of the same node *)
107
  eexpr =
115
and  eexpr =
108 116
    {eexpr_tag: tag;
109 117
     eexpr_qfexpr: expr;
110 118
     eexpr_quantifiers: (quantifier_type * var_decl list) list;
......
113 121
     mutable eexpr_normalized: (var_decl * eq list * var_decl list) option;
114 122
     eexpr_loc: Location.t}
115 123

  
116
and expr_annot = {
117
  annots: (string list * eexpr) list;
118
  annot_loc: Location.t
119
}
120
and 
121
 eq =
122
    {eq_lhs: ident list;
123
     eq_rhs: expr;
124
     eq_loc: Location.t}
125

  
124
and expr_annot =
125
 {annots: (string list * eexpr) list;
126
  annot_loc: Location.t}
126 127

  
127 128
type node_annot = {
128 129
  requires: eexpr list;
......
136 137
      assert_loc: Location.t;
137 138
    } 
138 139

  
140
type automata_desc =
141
  {aut_id : ident;
142
   aut_handlers: handler_desc list;
143
   aut_loc: Location.t}
144

  
145
and handler_desc =
146
  {hand_state: ident;
147
   hand_unless: (expr * bool * ident) list;
148
   hand_until: (expr * bool * ident) list;
149
   hand_locals: var_decl list;
150
   hand_eqs: eq list;
151
   hand_loc: Location.t}
152

  
153
type statement =
154
| Eq of eq
155
| Aut of automata_desc
156

  
139 157
type node_desc =
140 158
    {node_id: ident;
141 159
     mutable node_type: Types.type_expr;
......
174 192

  
175 193
type top_decl_desc =
176 194
| Node of node_desc
177
| Consts of const_desc list
195
| Const of const_desc
178 196
| ImportedNode of imported_node_desc
179 197
| Open of bool * string (* the boolean set to true denotes a local 
180 198
			   lusi vs a lusi installed at system level *)
181
| Type of type_def
199
| TypeDef of typedef_desc
182 200

  
183 201
type top_decl =
184
    {top_decl_desc: top_decl_desc;
185
     top_decl_loc: Location.t}
202
    {top_decl_desc: top_decl_desc;      (* description of the symbol *)
203
     top_decl_owner: Location.filename; (* the module where it is defined *)
204
     top_decl_itf: bool;                (* header or source file ? *)
205
     top_decl_loc: Location.t}          (* the location where it is defined *)
186 206

  
187 207
type program = top_decl list
188 208

  
......
192 212
  | No_main_specified
193 213
  | Unbound_symbol of ident
194 214
  | Already_bound_symbol of ident
195

  
215
  | Unknown_library of ident
196 216

  
197 217
(* Local Variables: *)
198 218
(* compile-command:"make -C .." *)

Also available in: Unified diff