Fix Coq backend

Uses a more complete tactic to go from or-separated clause to the
negation-implication encoding of clauses used by the coq backend.

Also uses a better suffix for temporary clauses than "_or".
This commit is contained in:
Guillaume Bury 2017-08-09 21:53:06 +02:00
parent 87f080ea47
commit fa7da17cde

View file

@ -32,7 +32,7 @@ module Make(S : Res.S)(A : Arg with type atom := S.atom
end) end)
let name c = c.S.St.name let name c = c.S.St.name
let name_tmp c = c.S.St.name ^ "_or" let name_tmp c = c.S.St.name ^ "_tmp"
let pp_atom fmt a = let pp_atom fmt a =
if a == S.St.(a.var.pa) then if a == S.St.(a.var.pa) then
@ -65,8 +65,8 @@ module Make(S : Res.S)(A : Arg with type atom := S.atom
m m
let clausify fmt clause = let clausify fmt clause =
Format.fprintf fmt "assert (%s: %a).@\nintros; try destruct %s; auto. clear %s.@\n" Format.fprintf fmt "assert (%s: %a).@\ntauto. clear %s.@\n"
(name clause) pp_clause clause (name_tmp clause) (name_tmp clause) (name clause) pp_clause clause (name_tmp clause)
let elim_duplicate fmt goal hyp _ = let elim_duplicate fmt goal hyp _ =
(** Printing info comment in coq *) (** Printing info comment in coq *)