let mk_assign_annots_for_froms config bhv _fct_pre assign =
  let annots = Hannots.create 7 in
  let add_post v p = match p with None -> ()
    | Some post ->
        let edges = Cil2cfg.succ_e config.cfg v in
        let assumes = Logic_const.ptrue in (* assumes used in pre. *)
        let post = prepare_fct_post config bhv Normal assumes post in
        let post = add_prop config empty_acc Agoal post in
          add_on_edges annots post edges
  in
  let get_node_annot v = match Cil2cfg.node_type v with
    | Cil2cfg.VfctIn -> ()
        (* Don't put the precondition here because we don't want to build
        * (pre => post) => (pre' => post') but rather 
        * (pre /\ pre' /\ post => post') so we have to process the pre latter
        * (see SKfroms) *)


    | Cil2cfg.VfctOut  -> add_post v (WpFroms.mk_assign_post Normal assign)
    | Cil2cfg.Vexit -> add_post v (WpFroms.mk_assign_post Exits assign)

    | Cil2cfg.VblkIn (Cil2cfg.Bstmt _s, _)
    | Cil2cfg.Vstmt _s | Cil2cfg.VcallIn (_s,_,_,_)
    | Cil2cfg.Vswitch (_s,_) | Cil2cfg.Vtest (true, _s, _)
      -> (* TODO: add_stmt_annots v s *) ()

    | Cil2cfg.Vloop (_, s) ->
        (* TODO: add_stmt_annots ~loop:true v s *) 
        (* at least need to give the loop assigns to compute something correct
         * ([] when no user loop assigns).
         * TODO: this should be changed because the strategy shouldn't be able
         * to produce an incorrect computation ! *)

          (*
     let edges_before = Cil2cfg.pred_e cfg v in
     let back_edges, entry_edges =
       List.partition Cil2cfg.is_back_edge edges_before
     in
       *)

     let edges_after = Cil2cfg.succ_e config.cfg v in
     let assigns = get_loop_assigns_for_from s in
     let p_assign = add_loop_assigns config Ahyp s assigns empty_acc in
       add_on_edges annots p_assign edges_after

    | _ -> ()
  in
  let _ = Cil2cfg.iter_nodes get_node_annot config.cfg in
    annots