Project

General

Profile

Revision f4cba4b8 src/lustre_types.ml

View differences:

src/lustre_types.ml
129 129
  { mode_id: ident; require: eexpr list; ensure: eexpr list; mode_loc: Location.t}
130 130

  
131 131
type contract_import =
132
  { import_nodeid: ident; inputs: expr list; outputs: expr list; import_loc: Location.t }
132
  { import_nodeid: ident;
133
    inputs: expr;
134
    outputs: expr;
135
    import_loc: Location.t }
133 136
    
134 137

  
135 138

  
......
174 177
    spec_loc: Location.t;
175 178
  }
176 179

  
180
type node_spec_t = Contract of contract_desc
181
                 | NodeSpec of ident
182

  
177 183
type node_desc =
178 184
    {node_id: ident;
179 185
     mutable node_type: Types.type_expr;
......
187 193
     node_stmts: statement list;
188 194
     mutable node_dec_stateless: bool;
189 195
     mutable node_stateless: bool option;
190
     node_spec: contract_desc option;
196
     node_spec: node_spec_t option;
191 197
     node_annot: expr_annot list;
198
     node_iscontract: bool;
192 199
    }
193 200

  
194 201
type imported_node_desc =
......
198 205
     nodei_inputs: var_decl list;
199 206
     nodei_outputs: var_decl list;
200 207
     nodei_stateless: bool;
201
     nodei_spec: contract_desc option;
208
     nodei_spec: node_spec_t option;
202 209
     (* nodei_annot: expr_annot list; *)
203 210
     nodei_prototype: string option;
204 211
     nodei_in_lib: string list;
......
213 220

  
214 221
  
215 222
type top_decl_desc =
216
| Node of node_desc
217
| Const of const_desc
218
| ImportedNode of imported_node_desc
219
| Open of bool * string (* the boolean set to true denotes a local
223
  | Node of node_desc
224
  | Const of const_desc
225
  | ImportedNode of imported_node_desc
226
  | Open of bool * string (* the boolean set to true denotes a local
220 227
			   lusi vs a lusi installed at system level *)
221
| Include of string (* the boolean set to true denotes a local
228
  | Include of string (* the boolean set to true denotes a local
222 229
			   lus vs a lus installed at system level *)
223
| TypeDef of typedef_desc
230
  | TypeDef of typedef_desc
224 231
    
225 232
type top_decl =
226 233
    {top_decl_desc: top_decl_desc;      (* description of the symbol *)
......
237 244
    is_stateful: bool
238 245
  }
239 246

  
247
type spec_types =
248
  | LocalContract of contract_desc
249
  | TopContract of top_decl list
250

  
240 251

  
241 252

  
242 253
(* Local Variables: *)

Also available in: Unified diff