]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/cic/cicParser2.ml
* Major code cleanup.
[helm.git] / helm / ocaml / cic / cicParser2.ml
index 562f79bba66150b0e5aea5c2e2c5cd5a5feaf856..0dbf9f41075c9075847247d01d2fe89f9d55d66e 100644 (file)
@@ -126,14 +126,6 @@ let get_content n =
   | _     -> raise (IllFormedXml 1)
 ;;
 
-let register_id id node =
- if !CicParser3.process_annotations then
-  match !CicParser3.ids_to_targets with
-     None -> assert false
-   | Some ids_to_targets ->
-      Hashtbl.add ids_to_targets id (Cic.Object node)
-;;
-
 (* Functions that, given the list of sons of a node of the cic dom (objects   *)
 (* level), retrieve the internal representation associated to the node.       *)
 (* Everytime a cic term subtree is found, it is translated to the internal    *)
@@ -231,37 +223,27 @@ let rec get_term n =
               (v'#extension#to_cic_term, t'#extension#to_cic_term)
         | _ -> raise (IllFormedXml 6)
       and xid = string_of_attr (n#attribute "id") in
-       let res = C.ADefinition (xid, ref None, id, value, typ, params) in
-        register_id xid res ;
-        res
+       C.ADefinition (xid, id, value, typ, params)
   | D.T_element "Axiom" ->
       let id = string_of_attr (n # attribute "name")
       and params = uri_list_of_attr (n # attribute "params")
       and typ = 
        (get_content (get_content n))#extension#to_cic_term
       and xid = string_of_attr (n#attribute "id") in
-       let res = C.AAxiom (xid, ref None, id, typ, params) in
-        register_id xid res ;
-        res
+       C.AAxiom (xid, id, typ, params)
   | D.T_element "CurrentProof" ->
      let name = string_of_attr (n#attribute "name")
      and xid = string_of_attr (n#attribute "id") in
      let sons = n#sub_nodes in
       let (conjs, value, typ) = get_conjs_value_type sons in
-       let res = C.ACurrentProof (xid, ref None, name, conjs, value, typ) in
-        register_id xid res ;
-        res
+       C.ACurrentProof (xid, name, conjs, value, typ)
   | D.T_element "InductiveDefinition" ->
      let sons = n#sub_nodes
      and xid = string_of_attr (n#attribute "id") in
       let inductiveTypes = get_inductive_types sons
       and params = uri_list_of_attr (n#attribute "params")
       and nparams = int_of_attr (n#attribute "noParams") in
-       let res =
-        C.AInductiveDefinition (xid, ref None, inductiveTypes, params, nparams)
-       in
-        register_id xid res ;
-        res
+       C.AInductiveDefinition (xid, inductiveTypes, params, nparams)
   | D.T_element "Variable" ->
      let name = string_of_attr (n#attribute "name")
      and xid = string_of_attr (n#attribute "id")
@@ -279,9 +261,7 @@ let rec get_term n =
               (None, t'#extension#to_cic_term)
         | _ -> raise (IllFormedXml 6)
      in
-      let res = C.AVariable (xid,ref None,name,body,typ) in
-       register_id xid res ;
-       res
+      C.AVariable (xid,name,body,typ)
   | D.T_element _
   | D.T_data
   | _ ->