aboutsummaryrefslogtreecommitdiff
path: root/proofs/proof_trees.ml
diff options
context:
space:
mode:
authorherbelin2001-08-10 14:42:22 +0000
committerherbelin2001-08-10 14:42:22 +0000
commit8e92ee787e7d1fd48cae1eccf67a9b05e739743e (patch)
treeb33191fbaba0cad4b14a96cf5d7786dd2c07c3d7 /proofs/proof_trees.ml
parentc0a3b41ad2f2afba3f060e0d4001bd7aceea0831 (diff)
Parsing
- Typage renforcé dans les grammaires (distinction des vars et des metavars) - Disparition de SLAM au profit de ABSTRACT - Paths primitifs dans les quotations (syntaxe concrète à base de .) - Mise en place de identifier dès le type ast - Protection de identifier contre les effets de bord via un String.copy - Utilisation de module_ident (= identifier) dans les dir_path (au lieu de string) Table des noms qualifiés - Remplacement de la table de visibilité par une table qui ne cache plus les noms de modules et sections mais seulement les noms des constantes (e.g. Require A. ne cachera plus le contenu d'un éventuel module A déjà existant : seuls les noms de constructions de l'ancien A qui existent aussi dans le nouveau A seront cachés) - Renoncement à la possibilité d'accéder les formes non déchargées des constantes définies à l'intérieur de sections et simplification connexes (suppression de END-SECTION, une seule table de noms qui ne survit pas au discharge) - Utilisation de noms longs pour les modules, de noms qualifiés pour Require and co, tests de cohérence; pour être cohérent avec la non survie des tables de noms à la sortie des section, les require à l'intérieur d'une section eux aussi sont refaits à la fermeture de la section git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@1889 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'proofs/proof_trees.ml')
-rw-r--r--proofs/proof_trees.ml26
1 files changed, 11 insertions, 15 deletions
diff --git a/proofs/proof_trees.ml b/proofs/proof_trees.ml
index 8bfa53842c..222b8277a2 100644
--- a/proofs/proof_trees.ml
+++ b/proofs/proof_trees.ml
@@ -342,13 +342,12 @@ open Termast
let ast_of_cvt_bind f = function
| (NoDep n,c) -> ope ("BINDING", [(num n); ope ("COMMAND",[(f c)])])
- | (Dep id,c) -> ope ("BINDING", [nvar (string_of_id id);
- ope ("COMMAND",[(f c)])])
+ | (Dep id,c) -> ope ("BINDING", [nvar id; ope ("COMMAND",[(f c)])])
| (Com,c) -> ope ("BINDING", [ope ("COMMAND",[(f c)])])
let rec ast_of_cvt_intro_pattern = function
| WildPat -> ope ("WILDCAR",[])
- | IdPat id -> nvar (string_of_id id)
+ | IdPat id -> nvar id
| DisjPat l -> ope ("DISJPATTERN", (List.map ast_of_cvt_intro_pattern l))
| ConjPat l -> ope ("CONJPATTERN", (List.map ast_of_cvt_intro_pattern l))
| ListPat l -> ope ("LISTPATTERN", (List.map ast_of_cvt_intro_pattern l))
@@ -363,7 +362,7 @@ let last_of_cvt_flags (_,red) =
let lqid =
List.map
(function
- | EvalVarRef id -> nvar (string_of_id id)
+ | EvalVarRef id -> nvar id
| EvalConstRef sp ->
ast_of_qualid (Global.qualid_of_global (ConstRef sp)))
lconst in
@@ -383,7 +382,7 @@ let ast_of_cvt_redexp = function
| Unfold l ->
ope("Unfold",List.map (fun (locc,sp) -> ope("UNFOLD",
[match sp with
- | EvalVarRef id -> nvar (string_of_id id)
+ | EvalVarRef id -> nvar id
| EvalConstRef sp ->
ast_of_qualid (Global.qualid_of_global (ConstRef sp))]
@(List.map num locc))) l)
@@ -397,8 +396,8 @@ let ast_of_cvt_redexp = function
(* Gives the ast corresponding to a tactic argument *)
let ast_of_cvt_arg = function
- | Identifier id -> nvar (string_of_id id)
- | Qualid qid -> nvar (Nametab.string_of_qualid qid)
+ | Identifier id -> nvar id
+ | Qualid qid -> ast_of_qualid qid
| Quoted_string s -> str s
| Integer n -> num n
| Command c -> ope ("COMMAND",[c])
@@ -411,8 +410,8 @@ let ast_of_cvt_arg = function
"Constr_context argument could not be used">]
| Clause idl ->
let transl = function
- | InHyp id -> ope ("INHYP", [nvar (string_of_id id)])
- | InHypType id -> ope ("INHYPTYPE", [nvar (string_of_id id)]) in
+ | InHyp id -> ope ("INHYP", [nvar id])
+ | InHypType id -> ope ("INHYPTYPE", [nvar id]) in
ope ("CLAUSE", List.map transl idl)
| Bindings bl -> ope ("BINDINGS",
List.map (ast_of_cvt_bind (fun x -> x)) bl)
@@ -424,17 +423,14 @@ let ast_of_cvt_arg = function
| Tacexp ast -> ope ("TACTIC",[ast])
| Tac (tac,ast) -> ast
| Redexp red -> ope("REDEXP",[ast_of_cvt_redexp red])
- | Fixexp (id,n,c) -> ope ("FIXEXP",[(nvar (string_of_id id));
- (num n);
- ope ("COMMAND",[c])])
- | Cofixexp (id,c) -> ope ("COFIXEXP",[(nvar (string_of_id id));
- (ope ("COMMAND",[c]))])
+ | Fixexp (id,n,c) -> ope ("FIXEXP",[nvar id; num n; ope ("COMMAND",[c])])
+ | Cofixexp (id,c) -> ope ("COFIXEXP",[nvar id; ope ("COMMAND",[c])])
| Intropattern p -> ast_of_cvt_intro_pattern p
| Letpatterns (gl_occ_opt,hyp_occ_list) ->
let hyps_pats =
List.map
(fun (id,l) ->
- ope ("HYPPATTERN", nvar (string_of_id id) :: (List.map num l)))
+ ope ("HYPPATTERN", nvar id :: (List.map num l)))
hyp_occ_list in
let all_pats =
match gl_occ_opt with