]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/paramodulation/inference.mli
ready for 0.1.1 release
[helm.git] / helm / ocaml / paramodulation / inference.mli
index a895340c57f1e124d42f6e88df8342addbc8db08..b7a10fe34c952ab5fe476309b94bb6c09b4f5420 100644 (file)
@@ -1,15 +1,41 @@
 type equality =
-    Cic.term *     (* proof *)
-    (Cic.term *    (* type *)
-     Cic.term *    (* left side *)
-     Cic.term) *   (* right side *)
-    Cic.metasenv * (* environment for metas *)
-    Cic.term list  (* arguments *)
-;;
+    int *                (* weight *)
+    proof * 
+    (Cic.term *          (* type *)
+     Cic.term *          (* left side *)
+     Cic.term *          (* right side *)
+     Utils.comparison) * (* ordering *)  
+    Cic.metasenv *       (* environment for metas *)
+    Cic.term list        (* arguments *)
 
-type environment = Cic.metasenv * Cic.context * CicUniv.universe_graph;;
+and proof =
+  | NoProof
+  | BasicProof of Cic.term
+  | ProofBlock of
+      Cic.substitution * UriManager.uri *
+        (* name, ty, eq_ty, left, right *)
+        (Cic.name * Cic.term * Cic.term * Cic.term * Cic.term) * 
+        (Utils.pos * equality) * proof
+  | ProofGoalBlock of proof * equality
+  | ProofSymBlock of Cic.term Cic.explicit_named_substitution * proof
 
 
+type environment = Cic.metasenv * Cic.context * CicUniv.universe_graph
+
+
+exception MatchingFailure
+
+val matching:
+  Cic.metasenv -> Cic.context -> Cic.term -> Cic.term ->
+  CicUniv.universe_graph ->
+  Cic.substitution * Cic.metasenv * CicUniv.universe_graph
+
+val unification:
+  Cic.metasenv -> Cic.context -> Cic.term -> Cic.term ->
+  CicUniv.universe_graph ->
+  Cic.substitution * Cic.metasenv * CicUniv.universe_graph
+
+    
 (**
    Performs the beta expansion of the term "where" w.r.t. "what",
    i.e. returns the list of all the terms t s.t. "(t what) = where".
@@ -40,12 +66,14 @@ exception TermIsNotAnEquality;;
 val equality_of_term: ?eq_uri:UriManager.uri -> Cic.term -> Cic.term ->
   equality
 
+val term_is_equality: ?eq_uri:UriManager.uri -> Cic.term -> bool
+
 (**
    superposition_left env target source
    returns a list of new clauses inferred with a left superposition step
    the negative equation "target" and the positive equation "source"
 *)
-val superposition_left: environment -> equality -> equality -> equality list
+(* val superposition_left: environment -> equality -> equality -> equality list *)
 
 (**
    superposition_right newmeta env target source
@@ -54,12 +82,28 @@ val superposition_left: environment -> equality -> equality -> equality list
    "newmeta" is the first free meta index, i.e. the first number above the
    highest meta index: its updated value is also returned
 *)
-val superposition_right:
-  int -> environment -> equality -> equality -> int * equality list
-
-val demodulation: int -> environment -> equality -> equality -> int * equality
+(* val superposition_right: *)
+(*   int -> environment -> equality -> equality -> int * equality list *)
 
-val meta_convertibility: Cic.term -> Cic.term -> bool
+(* val demodulation: int -> environment -> equality -> equality -> int * equality *)
 
 val meta_convertibility_eq: equality -> equality -> bool
 
+val is_identity: environment -> equality -> bool
+
+val string_of_equality: ?env:environment -> equality -> string
+
+(* val subsumption: environment -> equality -> equality -> bool *)
+
+val metas_of_term: Cic.term -> int list
+
+val fix_metas: int -> equality -> int * equality
+
+val extract_differing_subterms:
+  Cic.term -> Cic.term -> (Cic.term * Cic.term) option
+
+val build_proof_term: equality -> Cic.term
+
+val find_library_equalities:
+  dbd:Mysql.dbd -> Cic.context -> ProofEngineTypes.status -> int ->
+  equality list * int