let propagates_pre_post_constraints_bycase file root =
  Hashtbl.clear functions_pre_usecase ;
  Hashtbl.clear functions_post_usecase;
  spec_modified:=false;

  let visitor = new visit_propagating_pre_post_constraints_bycase (Data_for_aorai.getAutomata()) in
  Cil.visitCilFile (visitor :> Cil.cilVisitor) file;

  (* Refining specification according to use-cases. *)
  List.iter
    (fun name ->
       if name <> root then
         begin
           let old_pre  = (Data_for_aorai.get_func_pre name) in
           let old_post = (Data_for_aorai.get_func_post_bycase name) in
           let used_pre =
             try Hashtbl.find functions_pre_usecase  name with Not_found -> (mk_empty_pre_or_post_bycase()) in
           let used_post =
             try Hashtbl.find functions_post_usecase name with Not_found -> (mk_empty_pre_or_post_bycase()) in


           (* Reformating usecases of pre and post *)
           let used_pre_st,used_pre_tr = pre_flattening used_pre in
           let used_pre_st,used_pre_tr = (ref used_pre_st),(ref used_pre_tr) in

           let used_post_st,used_post_tr = post_pseudo_flattening used_post in
           let used_post_st,used_post_tr = 
             (ref used_post_st),(ref used_post_tr)
           in
           (* Computing new pre/post *)
           let cur_pre =
             double_bool_array_and (!used_pre_st,!used_pre_tr) old_pre
           in
           let cur_post =
             double_bool_array_and_bycase 
               (!used_post_st,!used_post_tr) old_post 
           in
           if   (not (double_bool_array_eq old_pre  cur_pre ) )
           then begin spec_modified:=true;  end;
           if   (not (double_bool_array_eq_bycase old_post cur_post) )
           then begin spec_modified:=true;  end;


           Data_for_aorai.set_func_pre  name cur_pre;
           Data_for_aorai.set_func_post_bycase name cur_post
         end
    )
    (Data_for_aorai.getFunctions_from_c ());

  !spec_modified