let return kf e p =
    match e with
      | Some e ->
          begin try
            let v = Macros.result_var kf in
            let v = WpFol.lv_to_fol_var v in
              mk_let ~fresh:false v (texpr e) p
          with Types.Unsupported t ->
            let msg = "unsupported type in 'return' processing: "^t in
            raise (Calculus.InvalidModel msg)
          end
      | None -> p