Project

General

Profile

Revision 3769b712 src/optimize_prog.ml

View differences:

src/optimize_prog.ml
9 9
(*                                                                  *)
10 10
(********************************************************************)
11 11

  
12
open Lustre_types
13
open Corelang
12
open Lustrec.Lustre_types
13
open Lustrec.Corelang
14 14
(* open LustreSpec *)
15 15

  
16 16
(* Consts unfoooolding *)
......
28 28
  let unfold = expr_unfold_consts consts in
29 29
  match e with
30 30
  | Expr_const _ -> e
31
  | Expr_ident i -> if is_const i consts && not (Types.is_array_type e_type) then Expr_const (get_const i consts) else e
31
  | Expr_ident i -> if is_const i consts && not (Lustrec.Types.is_array_type e_type) then Expr_const (get_const i consts) else e
32 32
  | Expr_array el -> Expr_array (List.map unfold el)
33 33
  | Expr_access (e1, d) -> Expr_access (unfold e1, d)
34 34
  | Expr_power (e1, d) -> Expr_power (unfold e1, d)
......
74 74
    | Expr_fby _
75 75
    | Expr_pre _
76 76
	-> apply_stack expr stack
77
    | Expr_appl (id, _, _) when not (Stateless.check_node (node_from_name id))
77
    | Expr_appl (id, _, _) when not (Lustrec.Stateless.check_node (node_from_name id))
78 78
	-> apply_stack expr stack
79 79
    | Expr_ite (c, t, e)
80 80
        -> let cid = ident_of_expr c in

Also available in: Unified diff