let add_goal env g wp =
on_context env "add_goal" wp Keep_opened Clear_assigns
(fun env _assigns p ->
if F.is_false p then p else
let pid, pn = g in
match predicate env pn with
| Result g ->
F.p_and g p
| Warning(source,reason) ->
Datalib.Collector.add_warning ~severe:true ~source ~reason
"Goal %a can not be translated"
Description.pp_property (WpPropId.property_of_id pid) ;
F.p_false)