Project

General

Profile

Revision df39e35a src/causality.ml

View differences:

src/causality.ml
216 216
    | Expr_access (e1, _)
217 217
    | Expr_power (e1, _) -> add_dep lhs_is_mem lhs e1 g
218 218
    | Expr_array a -> List.fold_right (add_dep lhs_is_mem lhs) a g
219
    | Expr_tuple t ->
220
(*
221
      if List.length t <> List.length lhs then ( 
222
	match lhs with
223
	| [l] -> List.fold_right (fun r -> add_dep lhs_is_mem [l] r) t g
224
	| _ -> 
225
	  Format.eprintf "Incompatible tuple assign: %a (%i) vs %a (%i)@.@?" 
226
	    (Utils.fprintf_list ~sep:"," (Format.pp_print_string)) lhs 
227
	    (List.length lhs)
228
	    Printers.pp_expr rhs
229
	    (List.length t)
230
	  ;
231
	  assert false
232
      )
233
      else
234
*)
235
	List.fold_right2 (fun l r -> add_dep lhs_is_mem [l] r) lhs t g
219
    | Expr_tuple t -> List.fold_right2 (fun l r -> add_dep lhs_is_mem [l] r) lhs t g
236 220
    | Expr_merge (c, hl) -> add_var lhs_is_mem lhs c (List.fold_right (fun (_, h) -> add_dep lhs_is_mem lhs h) hl g)
237 221
    | Expr_ite   (c, t, e) -> add_dep lhs_is_mem lhs c (add_dep lhs_is_mem lhs t (add_dep lhs_is_mem lhs e g))
238 222
    | Expr_arrow (e1, e2)  -> add_dep lhs_is_mem lhs e2 (add_dep lhs_is_mem lhs e1 g)

Also available in: Unified diff