let add_prop acc kind labels id p =
  let get_p () =
    let txt = WpPropId.prop_id_name id in
      try
        let p = NormAtLabels.preproc_annot labels p in
        let _ =
          debug "take (@[%s:@ %a@])@." txt !Ast_printer.d_predicate_named p
        in Some (WpPropId.mk_pred_info id p)
      with e -> NormAtLabels.catch_label_error e txt "annotation"None
  in
  let add_hyp l = match get_p () with None -> l | Some p -> p::l in
  let add_goal l =
    (* if goal_to_select config id
    then *)
 match get_p () with None -> l
      | Some p -> ( (* has_prop_goal := true; *) p::l )
        (* else l *)
  in
  let add_both goal l =
    match get_p () with None -> l
      | Some p ->
            (* if goal then has_prop_goal := true;*)
            (goal, p)::l
  in
  let info = acc.info in
  let goal, info = match kind with
      | Ahyp -> 
          false, { info with p_hyp = add_hyp info.p_hyp }
      | Agoal -> 
          true, { info with p_goal = add_goal info.p_goal }
      | Aboth goal ->
          goal, { info with p_both = add_both goal info.p_both }
      | AcutB goal ->
          goal, { info with p_cut = add_both goal info.p_cut }
      | AcallHyp -> 
          false, { info with call_hyp = add_hyp info.call_hyp }
      | AcallPre goal ->
          goal, { info with call_pre = add_both goal info.call_pre }
  in let acc = { acc with info = info } in
    if goal then { acc with has_prop_goal = trueelse acc