Revision a6df3992 src/corelang.ml
src/corelang.ml  

959  959 
and get_node_calls nodes node = 
960  960 
List.fold_left (fun accu eq > Utils.ISet.union (get_eq_calls nodes eq) accu) Utils.ISet.empty (get_node_eqs node) 
961  961  
962 
let rec get_expr_vars vars e = 

963 
get_expr_desc_vars vars e.expr_desc 

964 
and get_expr_desc_vars vars expr_desc = 

962 
let get_expr_vars e = 

963 
let rec get_expr_vars vars e = 

964 
get_expr_desc_vars vars e.expr_desc 

965 
and get_expr_desc_vars vars expr_desc = 

966 
Format.eprintf "get_expr_desc_vars expr=%a@." Printers.pp_expr (mkexpr Location.dummy_loc expr_desc); 

965  967 
match expr_desc with 
966  968 
 Expr_const _ > vars 
967 
 Expr_ident x > Utils.ISet.add x vars 

969 
 Expr_ident x > Format.eprintf "%s is an ident!@." x; Utils.ISet.add x vars


968  970 
 Expr_tuple el 
969  971 
 Expr_array el > List.fold_left get_expr_vars vars el 
970  972 
 Expr_pre e1 > get_expr_vars vars e1 
...  ...  
977  979 
 Expr_merge (c, hl) > List.fold_left (fun vars (_, h) > get_expr_vars vars h) (Utils.ISet.add c vars) hl 
978  980 
 Expr_appl (_, arg, None) > get_expr_vars vars arg 
979  981 
 Expr_appl (_, arg, Some r) > List.fold_left get_expr_vars vars [arg; r] 
980  
982 
in 

983 
get_expr_vars Utils.ISet.empty e 

981  984  
982  985 
let rec expr_has_arrows e = 
983  986 
expr_desc_has_arrows e.expr_desc 
Also available in: Unified diff