| _ -> 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 *)
(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")
(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
| _ ->