X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql%2FmathQL.ml;h=04eb3b32d30e7900e854dd2cec055d81f5bcc346;hb=856dc227c9781439a31d03f5b68d32a41db63ab9;hp=71682f2a0792a34788b60140401ccda2728faa3f;hpb=ba64642ca7771cd9cc7b9f73476c8f608ffeeda5;p=helm.git diff --git a/helm/ocaml/mathql/mathQL.ml b/helm/ocaml/mathql/mathQL.ml index 71682f2a0..04eb3b32d 100644 --- a/helm/ocaml/mathql/mathQL.ml +++ b/helm/ocaml/mathql/mathQL.ml @@ -35,6 +35,25 @@ (******************************************************************************) +(* output data structures ***************************************************) + +type path = string * (string list) (* the name of an attribute *) + +type value = string list (* the value of an attribute *) + +type attribute = path * value (* an attribute *) + +type attribute_group = attribute list (* a group of attributes *) + +type attribute_set = attribute_group list (* the attributes of an URI *) + +type resource = string * attribute_set (* an attributed URI *) + +type resource_set = resource list (* the query result *) + +type result = resource_set + + (* input data structures ****************************************************) type svar = string (* the name of a variable for a resource set *) @@ -43,19 +62,17 @@ type rvar = string (* the name of a variable for a resource *) type vvar = string (* the name of a variable for an attribute value *) -type refine_op = ExactOp - | SubOp - | SuperOp +type inverse = bool -type path = string list - -type vvar_list = vvar list +type refine = RefineExact + | RefineSub + | RefineSuper type set_exp = SVar of svar | RVar of rvar | Ref of val_exp | Pattern of val_exp - | Relation of bool * refine_op * path * set_exp * vvar_list + | Relation of inverse * refine * path * set_exp * string list | Select of rvar * set_exp * boole_exp | Union of set_exp * set_exp | Intersect of set_exp * set_exp @@ -75,26 +92,9 @@ and boole_exp = False and val_exp = Const of string list | RefOf of set_exp - | Record of rvar * vvar + | Record of rvar * path | VVar of vvar - | Attribute of bool * refine_op * path * val_exp + | Attribute of inverse * refine * path * val_exp | Fun of string * val_exp type query = set_exp - - -(* output data structures ***************************************************) - -type value = string list (* the value of an attribute *) - -type attribute = string * value (* an attribute *) - -type attribute_group = attribute list (* a group of attributes *) - -type attribute_set = attribute_group list (* the attributes of an URI *) - -type resource = string * attribute_set (* an attributed URI *) - -type resource_set = resource list (* the query result *) - -type result = resource_set