X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmetadata%2FmetadataTypes.ml;h=719ba508c1ae37d5e40f364939c4dec35fe8658a;hb=ac7687ce66526f905874ed99a845223c853c558a;hp=dbe94695e0a8f707898c2940f02d041fb3ac7a47;hpb=21758b512843088d19e81830d9fb121725c8a16e;p=helm.git diff --git a/helm/ocaml/metadata/metadataTypes.ml b/helm/ocaml/metadata/metadataTypes.ml index dbe94695e..719ba508c 100644 --- a/helm/ocaml/metadata/metadataTypes.ml +++ b/helm/ocaml/metadata/metadataTypes.ml @@ -23,7 +23,19 @@ * http://helm.cs.unibo.it/ *) -type main_position = [ `MainConclusion | `MainHypothesis ] +let position_prefix = "http://www.cs.unibo.it/helm/schemas/schema-helm#" +(* let position_prefix = "" *) + +let inconcl_pos = position_prefix ^ "InConclusion" +let mainconcl_pos = position_prefix ^ "MainConclusion" +let mainhyp_pos = position_prefix ^ "MainHypothesis" +let inhyp_pos = position_prefix ^ "InHypothesis" +let inbody_pos = position_prefix ^ "InBody" + +type main_position = + [ `MainConclusion of int option (* Pi depth *) + | `MainHypothesis of int option (* Pi depth *) + ] type position = [ main_position @@ -35,8 +47,27 @@ type position = type pi_depth = int type metadata = - [ `Sort of Cic.sort * main_position * pi_depth - | `Rel of main_position * pi_depth - | `Obj of string * position * pi_depth option + [ `Sort of Cic.sort * main_position + | `Rel of main_position + | `Obj of string * position ] +type constr = + [ `Sort of Cic.sort * main_position list + | `Rel of main_position list + | `Obj of string * position list + ] + +let constr_of_metadata: metadata -> constr = function + | `Sort (sort, pos) -> `Sort (sort, [pos]) + | `Rel pos -> `Rel [pos] + | `Obj (uri, pos) -> `Obj (uri, [pos]) + +let sort_tbl = "refSort" +let rel_tbl = "refRel" +let obj_tbl = "refObj" +let owners_tbl = "owners" +let conclno_tbl = "no_inconcl_aux" +let conclno_hyp_tbl = "no_concl_hyp" +let name_tbl = "objectName" +