let test env e wpt wpf =
    let pt = zip wpt in
    let pf = zip wpf in
    let wpe = merge_assigns (fst wpt) (fst wpf) , snd empty in
    on_context env "test" wpe Keep_opened Keep_assigns
      (fun env _assigns _true ->
         match cond (L.mem_at env Clabels.Here) e with
           | Result b ->
               F.p_and
                 (F.p_named "Then" (F.p_implies b pt))
                 (F.p_named "Else" (F.p_implies (F.p_not b) pf))
           | Warning(source,reason) ->
               Datalib.Collector.add_warning ~source ~reason
                 "Ignored condition of if-statement (%a)" !Ast_printer.d_exp e ;
               F.p_and pt pf)