]> matita.cs.unibo.it Git - helm.git/commitdiff
added instance
authorEnrico Tassi <enrico.tassi@inria.fr>
Tue, 3 May 2005 12:50:34 +0000 (12:50 +0000)
committerEnrico Tassi <enrico.tassi@inria.fr>
Tue, 3 May 2005 12:50:34 +0000 (12:50 +0000)
helm/matita/matitaScript.ml
helm/ocaml/cic_disambiguation/.depend
helm/ocaml/cic_disambiguation/cicTextualParser2.ml

index 5abba5207e05e0a90febf538dc95a0dd551237e8..c64653c798bde6e90382880bd5070e060657e260 100644 (file)
@@ -117,7 +117,22 @@ let eval_statement status mathviewer user_goal s =
         in
         List.iter prerr_endline (MetadataQuery.match_term ~dbd:dbd term);
         assert false;
-
+     | TacticAst.Instance (_,term) ->
+        let dbd = MatitaDb.instance () in
+        let metasenv = MatitaMisc.get_proof_metasenv status in
+        let context = MatitaMisc.get_proof_context status in
+        let aliases = MatitaMisc.get_proof_aliases status in
+        let (_env,_metasenv,term,_graph) = 
+          let interps =
+            MatitaDisambiguator.disambiguate_term dbd context metasenv aliases term 
+          in
+          match interps with 
+          | [x] -> x
+          | _ -> assert false
+        in
+        List.iter prerr_endline (MetadataQuery.instance ~dbd term);
+        assert false
+        
         | TacticAst.Check (_,t) ->
             let metasenv = MatitaMisc.get_proof_metasenv status in
             let context = MatitaMisc.get_proof_context status in
index eeb856c66cc226d9afadaa0bab913812b1de8f12..e70fbb34f7bef09567c30a5d3f94651b89d32564 100644 (file)
@@ -7,17 +7,17 @@ disambiguateChoices.cmo: disambiguateTypes.cmi disambiguateChoices.cmi
 disambiguateChoices.cmx: disambiguateTypes.cmx disambiguateChoices.cmi 
 cicTextualLexer2.cmo: cicTextualLexer2.cmi 
 cicTextualLexer2.cmx: cicTextualLexer2.cmi 
-cicTextualParser2.cmo: cicTextualLexer2.cmi disambiguateChoices.cmi \
-    disambiguateTypes.cmi cicTextualParser2.cmi 
-cicTextualParser2.cmx: cicTextualLexer2.cmx disambiguateChoices.cmx \
-    disambiguateTypes.cmx cicTextualParser2.cmi 
-disambiguate.cmo: cicTextualParser2.cmi disambiguateChoices.cmi \
-    disambiguateTypes.cmi disambiguate.cmi 
-disambiguate.cmx: cicTextualParser2.cmx disambiguateChoices.cmx \
-    disambiguateTypes.cmx disambiguate.cmi 
-logic_notation.cmo: cicTextualParser2.cmi disambiguateChoices.cmi 
-logic_notation.cmx: cicTextualParser2.cmx disambiguateChoices.cmx 
-arit_notation.cmo: cicTextualParser2.cmi disambiguateChoices.cmi 
-arit_notation.cmx: cicTextualParser2.cmx disambiguateChoices.cmx 
+cicTextualParser2.cmo: disambiguateTypes.cmi disambiguateChoices.cmi \
+    cicTextualLexer2.cmi cicTextualParser2.cmi 
+cicTextualParser2.cmx: disambiguateTypes.cmx disambiguateChoices.cmx \
+    cicTextualLexer2.cmx cicTextualParser2.cmi 
+disambiguate.cmo: disambiguateTypes.cmi disambiguateChoices.cmi \
+    cicTextualParser2.cmi disambiguate.cmi 
+disambiguate.cmx: disambiguateTypes.cmx disambiguateChoices.cmx \
+    cicTextualParser2.cmx disambiguate.cmi 
+logic_notation.cmo: disambiguateChoices.cmi cicTextualParser2.cmi 
+logic_notation.cmx: disambiguateChoices.cmx cicTextualParser2.cmx 
+arit_notation.cmo: disambiguateChoices.cmi cicTextualParser2.cmi 
+arit_notation.cmx: disambiguateChoices.cmx cicTextualParser2.cmx 
 tex_notation.cmo: cicTextualParser2.cmi 
 tex_notation.cmx: cicTextualParser2.cmx 
index 34b3d01e0cc18a72dde5f36c0953930b46989681..e7506a15d7b140adcef126ce8a78d87a5cfd48f2 100644 (file)
@@ -482,6 +482,7 @@ EXTEND
         TacticAst.Check (loc, t)
     | [ IDENT "hint" ] -> TacticAst.Hint loc
     | [ IDENT "pmatch" ] ; t = term -> TacticAst.Match (loc,t)
+    | [ IDENT "instance" ] ; t = term -> TacticAst.Instance (loc,t)
     | [ IDENT "print" ]; name = QSTRING -> TacticAst.Print (loc, name)
   ]];