Better proving of hypothesis

This commit is contained in:
Guillaume Bury 2015-03-13 14:23:40 +01:00
parent d7c5077c0a
commit cddf914ce6
2 changed files with 4 additions and 1 deletions

View file

@ -501,7 +501,6 @@ module Make (L : Log_intf.S)(E : Expr_intf.S)
L.debug 10 "Adding clause : %a" St.pp_clause init0;
try
if Proof.has_been_proved init0 then raise Trivial;
assert (Proof.is_proven init0);
let atoms, init = partition atoms init0 in
let size = List.length atoms in
match atoms with
@ -514,6 +513,7 @@ module Make (L : Log_intf.S)(E : Expr_intf.S)
else make_clause name atoms size true (History [init0])
in
L.debug 1 "New clause : %a" St.pp_clause init0;
Proof.prove clause;
attach_clause clause;
Vec.push env.clauses clause;
if a.neg.is_true then begin

View file

@ -52,6 +52,9 @@ module type S = sig
hyptohesis and theory lemmas always have trivial derivations, and as such [is_proven c] (where [c]
is a hypothesis or lemma) will always return [true] and add it to the proof graph. *)
val prove : clause -> unit
(** Same as 'learn', but works on single clauses instead of vectors. *)
val learn : clause Vec.t -> unit
(** Learn and build proofs for the clause in the vector. Clauses in the vector should be in the order they were learned. *)