Project

General

Profile

Revision 45f0f48d src/normalization.ml

View differences:

src/normalization.ml
393 393
	  annots = List.map (fun v ->
394 394
	    let eq =
395 395
	      try
396
		List.find (fun eq -> eq.eq_lhs = [v.var_id]) (defs@assert_defs) 
397
	      with Not_found -> (Format.eprintf "var not found %s@." v.var_id; assert false) in
396
		List.find (fun eq -> List.exists (fun v' -> v' = v.var_id ) eq.eq_lhs) (defs@assert_defs) 
397
	      with Not_found -> 
398
		(
399
		  Format.eprintf "Traceability annotation generation: var %s not found@." v.var_id; 
400
		  assert false
401
		) 
402
	    in
398 403
	    let expr = substitute_expr diff_vars (defs@assert_defs) eq.eq_rhs in
399 404
	    let pair = mkeexpr expr.expr_loc (mkexpr expr.expr_loc (Expr_tuple [expr_of_ident v.var_id expr.expr_loc; expr])) in
400 405
	    (["traceability"], pair)

Also available in: Unified diff