X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmetadata%2FmetadataTypes.ml;h=719ba508c1ae37d5e40f364939c4dec35fe8658a;hb=d6bdacb3cf305051e9e19f8b0422a33315a9279b;hp=0db48f299dde415b8e8584556527d163167f8a8f;hpb=43f7741d0d6e714f0e1fd183d2fc43af267a445c;p=helm.git diff --git a/helm/ocaml/metadata/metadataTypes.ml b/helm/ocaml/metadata/metadataTypes.ml index 0db48f299..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,11 +47,22 @@ 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"