X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql%2FmathQL.ml;h=61a7646aa6261d842ff07fa38e8fd84906f04f27;hb=89262281b6e83bd2321150f81f1a0583645eb0c8;hp=d375d92afeac7ecf3971081247b8ad2dd5316e71;hpb=ba824e867afc3eaf081ed1a1d6526d421242a6a0;p=helm.git diff --git a/helm/ocaml/mathql/mathQL.ml b/helm/ocaml/mathql/mathQL.ml index d375d92af..61a7646aa 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,19 @@ 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 refine = RefineExact + | RefineSub + | RefineSuper -type vvar_list = vvar list +type assign = path * path type set_exp = SVar of svar | RVar of rvar | Ref of val_exp | Pattern of val_exp - | Relation of refine_op * path * set_exp * vvar_list + | Relation of inverse * refine * path * set_exp * assign list | Select of rvar * set_exp * boole_exp | Union of set_exp * set_exp | Intersect of set_exp * set_exp @@ -75,26 +94,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 + | Property of inverse * refine * path * val_exp | Fun of string * val_exp - | Attribute of refine_op * path * 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