module Proof:The representation and checking of proofssig
..end
val checkProofs : bool Pervasives.ref
val printMagicProofWarning : bool Pervasives.ref
type
parg =
| |
I of |
| |
S of |
| |
E of |
| |
P of |
| |
F of |
type
proof =
| |
Hyp of |
|||
| |
Truei |
|||
| |
Falsee of |
(* | False elimination, if we have a proof of false | *) |
| |
Andi of |
(* | Proves And | *) |
| |
Ande of |
(* | Ande (i,pf) is a proof of p when
pf is a proof of And ps, where List.nth ps i = p | *) |
| |
Alli of |
|||
| |
Alle of |
|||
| |
Existe of |
|||
| |
Impi of |
|||
| |
Impe of |
|||
| |
Contra of |
|||
| |
G of |
|||
| |
Refl of |
|||
| |
Symm of |
(* | Symm p proves e1=e2 if p:e2=e1 | *) |
| |
Trans of |
(* | Trans(et, p1t, p2t) proves e1=e2 if p1t:e1=et, pt2:et=e2 | *) |
| |
Cong of |
(* | Cong [pf] proves Unop e1 = Unop e2 if pf proves e1 = e2;
Cong [pf1; pf2] proves Binop (a1,b1) = Binop (a2,b2) if
pf1 proves a1=a2 and pf2 proves b1=b2;
Cong pfs proves Fun(f,as) = Fun(f,bs) if
pfs.(n) proves as.(n) = bs.(n)
| *) |
| |
WithLemma of |
|||
| |
UnrollPDef of |
|||
| |
UnrollEDef of |
|||
| |
RollEDef of |
|||
| |
Arith of |
(* | Check that e = e' by verifying that (e - e') mod32 = 0 using the rules
of algebra. | *) |
| |
ArithNeq of |
(* | Check that e <> e' by verifiying that e - e' mod32 = i (i <> 0) using
the rules of algebra | *) |
| |
ArithApart of |
(* | ArithApart(r, e1, e2) means that e1 - e2 = r and (-4 >= r or r >=
4). | *) |
| |
ArithGeq of |
(* | Check that e >= e', by verifying that e - e' = i and i >= 0. !!!
This is unsound in presence of overflow. We'll have to clean this
up. | *) |
| |
ArithGt of |
(* | Check that e >= e', by verifying that e - e' = i and i > 0. !!!
This is unsound in presence of overflow. We'll have to clean this
up. | *) |
| |
SelUpd0 of |
|||
| |
SelUpd1 of |
|||
| |
Magic of |
(* | These are proofs that are allowed to go through the proof checker,
with a warning. Pass a string to identify this magic | *) |
| |
MagicLemma of |
(* | A magic proof of a lemma | *) |
| |
Unimplemented of |
type
lemma = {
|
lname : |
|
lvars : |
|
lhyps : |
|
lconc : |
val infer : Logic.var list ->
(Util.symbol * Logic.pred) list -> proof -> Logic.pred
val check : Logic.var list ->
(Util.symbol * Logic.pred) list -> proof -> Logic.pred -> unit
val registerLemma : lemma -> proof -> unit
val registeredLemmas : unit -> lemma list
val findRegisteredLemma : Util.symbol -> lemma
typeedef =
string * string list * Logic.exp
typepdef =
string * string list * Logic.pred
val registerEDef : edef -> unit
val registerPDef : pdef -> unit
val mkContraProof : Util.symbol -> Logic.pred -> proof -> proof
val d_prf : unit -> proof -> Pretty.doc
val dpa : parg -> Pretty.doc
val printer : Logic.logicPrinter Pervasives.ref
val allEDefs : (string, edef) Hashtbl.t
val allPDefs : (string, pdef) Hashtbl.t
val allLemmas : lemma Inthash.t
val init : unit -> unit
val snapshot : unit -> unit -> unit
val findLemma : lemma -> unit
val registeredLemmas : unit -> lemma list
val makeExistVar : string -> Logic.exp