https://github.com/EasyCrypt/easycrypt
Raw File
Tip revision: b7653953f88064c19e36437c980819d8a439a9ce authored by Pierre-Yves Strub on 16 June 2022, 07:41:17 UTC
[nix] force Why3 1.4.1
Tip revision: b765395
ecPhlTAuto.ml
(* -------------------------------------------------------------------- *)
open EcFol

open EcCoreGoal
open EcLowPhlGoal

(* -------------------------------------------------------------------- *)
let t_hoare_true_r tc =
  match (FApi.tc1_goal tc).f_node with
  | FhoareF hf when f_equal hf.hf_po f_true ->
      FApi.xmutate1 tc `HoareTrue []

  | FhoareS hs when f_equal hs.hs_po f_true ->
      FApi.xmutate1 tc `HoareTrue []

  | _ ->
    tc_error !!tc
      "the conclusion is not of the form %s"
      "hoare[_ : _ ==> true]"

let t_hoare_true = FApi.t_low0 "hoare-true" t_hoare_true_r

(* -------------------------------------------------------------------- *)
let t_core_exfalso_r tc =
  let pre   = tc1_get_pre tc in
    if not (f_equal pre f_false) then
      tc_error !!tc "pre-condition is not `false'";
    FApi.xmutate1 tc `ExFalso []

let t_core_exfalso = FApi.t_low0 "core-exfalso" t_core_exfalso_r
back to top