Project

General

Profile

Revision 7a19992d src/machine_code.ml

View differences:

src/machine_code.ml
291 291
 | Expr_access (t, i)               -> Access (translate_expr node args t, translate_expr node args (expr_of_dimension i))
292 292
 | Expr_power  (e, n)               -> Power  (translate_expr node args e, translate_expr node args (expr_of_dimension n))
293 293
 | Expr_tuple _
294
 | Expr_ite _
295 294
 | Expr_arrow _ 
296 295
 | Expr_fby _
297 296
 | Expr_pre _                       -> (Printers.pp_expr Format.err_formatter expr; Format.pp_print_flush Format.err_formatter (); raise NormalizationError)
......
302 301
   (match e.expr_desc with
303 302
   | Expr_tuple el -> Fun (node_name nd, List.map (translate_expr node args) el)
304 303
   | _             -> Fun (node_name nd, [translate_expr node args e]))
304
 | Expr_ite (g,t,e) -> Fun ("ite", [translate_expr node args g; translate_expr node args t; translate_expr node args e])
305

  
305 306
 | _                   -> raise NormalizationError
306 307

  
307 308
let translate_guard node args expr =
......
367 368
     d,
368 369
     reset_instance node args o r eq.eq_rhs.expr_clock @
369 370
       (control_on_clock node args eq.eq_rhs.expr_clock (MStep (var_p, o, vl))) :: s)
371
  | [x], Expr_ite   (c, t, e) -> 
372
    let var_x = node_var x node in
373
    (m, 
374
     si, 
375
     j, 
376
     d, 
377
     (control_on_clock node args eq.eq_rhs.expr_clock 
378
       (MLocalAssign (var_x, translate_expr node args eq.eq_rhs))::s)
379
    )
370 380
  | [x], _                                       ->
371 381
    let var_x = node_var x node in
372 382
    (m, si, j, d, 
......
425 435
      step_outputs = nd.node_outputs;
426 436
      step_locals = ISet.elements (ISet.diff locals m);
427 437
      step_checks = List.map (fun d -> d.Dimension.dim_loc, translate_expr nd init_args (expr_of_dimension d)) nd.node_checks;
428
      step_instrs = join_guards_list s;
438
      step_instrs = (* join_guards_list *) s;
429 439
    };
430 440
    mspec = nd.node_spec;
431 441
    mannot = nd.node_annot;

Also available in: Unified diff