X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql%2FmathQL.ml;h=b76bd4ed55631b81bb4e417e4a6ad3ea575a7743;hb=381006cf8b418cfdeaf145ab7df9e8f2b19ae2e6;hp=7e82fe5474a1919e49bfa08e25fa00c45dda5b69;hpb=931f10c61b4e3914474955a94a05cf43b5fa2bc0;p=helm.git diff --git a/helm/ocaml/mathql/mathQL.ml b/helm/ocaml/mathql/mathQL.ml index 7e82fe547..b76bd4ed5 100644 --- a/helm/ocaml/mathql/mathQL.ml +++ b/helm/ocaml/mathql/mathQL.ml @@ -28,22 +28,15 @@ (* output data structures ***************************************************) -type path = string list (* the name of an attribute *) +module I : Avs.Type = ListAvs -type value = string list (* the value of an attribute *) +type value = Avs.value (* a linearized attribute value *) -type attribute = path * value (* an attribute *) +type path = Avs.path (* the name of 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 +type group = I.group (* an group of attribures *) +type result = I.avs (* the query result *) (* input data structures ****************************************************) @@ -51,8 +44,6 @@ type svar = string (* the name of a variable for a resource set *) type avar = string (* the name of a variable for a resource *) -type vvar = string (* the name of a variable for an attribute value *) - type inverse = bool type refine = RefineExact @@ -73,58 +64,29 @@ type xml = bool type source = bool -type bin = BinFJoin (* full union - with attr handling *) - | BinFMeet (* full intersection - with attr handling *) - | BinFDiff (* full difference - with attr handling *) - type gen = GenFJoin (* full union - with attr handling *) | GenFMeet (* full intersection - with attr handling *) -type test = Xor - | Or - | And - | Sub - | Meet - | Eq - | Le - | Lt - -type query = Empty - | SVar of svar +type query = Const of (string * (path * query) list list) list + | SVar of svar | AVar of avar - | Subj of msval + | Dot of avar * path + | Ex of avar list * query + | Select of avar * query * query + | Let of svar option * query * query + | Fun of path * path list * query list + | Gen of path * query list + | Add of bool * groups * query + | For of gen * avar * query * query + | While of gen * query * query | Property of inverse * refine * path * main * istrue * isfalse list * exp_list * - pattern * msval - | Select of avar * query * msval - | Bin of bin * query * query - | LetSVar of svar * query * query - | LetVVar of vvar * msval * query - | For of gen * avar * query * query - | Add of bool * groups * query - | If of msval * query * query - | Log of xml * source * query - | StatQuery of query - | Keep of allbut * path list * query - -and msval = False - | True - | Not of msval - | Ex of avar list * msval - | Test of test * msval * msval - | Const of string - | Set of msval list - | Proj of path option * query - | Dot of avar * path - | VVar of vvar - | StatVal of msval - | Count of msval - | Align of string * msval - -and groups = Attr of (path * msval) list list + pattern * query + +and groups = Attr of (path * query) list list | From of avar -and con = pattern * path * msval +and con = pattern * path * query and istrue = con list