Project

General

Profile

Revision b84a138e src/normalization.ml

View differences:

src/normalization.ml
69 69
    { expr with expr_desc = Expr_ite (expr_once loc ck, e1, e2) }
70 70
 | _                   -> assert false
71 71

  
72
let unfold_arrow_active = ref true 
72 73
let cpt_fresh = ref 0
73 74

  
74 75
(* Generate a new local [node] variable *)
......
210 211
      normalize_expr ~alias:alias node offsets defvars norm_expr
211 212
    else
212 213
      mk_expr_alias_opt (alias && not (Basic_library.is_internal_fun id)) node defvars norm_expr
213
  | Expr_arrow (e1,e2) when not (is_expr_once expr) -> (* Here we differ from Colaco paper: arrows are pushed to the top *)
214
  | Expr_arrow (e1,e2) when !unfold_arrow_active && not (is_expr_once expr) -> (* Here we differ from Colaco paper: arrows are pushed to the top *)
214 215
    normalize_expr ~alias:alias node offsets defvars (unfold_arrow expr)
215 216
  | Expr_arrow (e1,e2) ->
216 217
    let defvars, norm_e1 = normalize_expr node offsets defvars e1 in

Also available in: Unified diff