let get_fct_post_annots config tkind spec =
  let acc = WpStrategy.empty_acc in
  match get_behav config Kglobal spec.spec_behavior with
    | None -> acc
    | Some b ->
        (* add the postconditions *)
        let f_nothing () _ = () in
        let add tk acc p = 
          let id = WpPropId.mk_fct_post_id config.kf b (tk, p) in
            if goal_to_select config id then
              WpStrategy.add_prop_fct_post acc WpStrategy.Agoal config.kf b tk p
            else acc
        in
        let acc = match tkind with
          | Normal ->
              let acc, _ =
                WpStrategy.fold_bhv_post_cond ~warn:true (add Normal) f_nothing (acc, ()) b
              in acc
          | Exits -> 
              let _, acc =
                WpStrategy.fold_bhv_post_cond ~warn:false f_nothing (add Exits) ((), acc) b
              in acc
          | _ -> assert false
        in (* also add the [assigns] *)
        let acc =
          if Kernel_function.is_definition config.kf
          then add_fct_assigns_goal config acc tkind b
          else WpStrategy.add_fct_bhv_assigns_hyp acc config.kf tkind b
        in acc