let add_hyp env hid h wp =
    on_context env "add_hyp" wp Keep_opened Keep_assigns
      (fun env _assigns p ->
         if F.is_true p then p else
           match predicate env h with
             | Result h ->
                 Datalib.Collector.add_depend hid "hypothesis";
                 F.p_implies h p
             | Warning(source,reason) ->
                 Datalib.Collector.add_warning ~source ~reason
                   "Ignored hypothesis %a" WpAnnot.pp_id hid ; p)