X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql%2FmathQL.ml;h=9c19f4a50f325fdab3648f531518dd29c785576c;hb=786284e9dfb25a31aad2161d59cdc5f36657e94a;hp=61a7646aa6261d842ff07fa38e8fd84906f04f27;hpb=fb7df84a9ffea7a67817b303a1d6983fb52e963d;p=helm.git diff --git a/helm/ocaml/mathql/mathQL.ml b/helm/ocaml/mathql/mathQL.ml index 61a7646aa..9c19f4a50 100644 --- a/helm/ocaml/mathql/mathQL.ml +++ b/helm/ocaml/mathql/mathQL.ml @@ -23,21 +23,12 @@ * http://www.cs.unibo.it/helm/. *) -(******************************************************************************) -(* *) -(* PROJECT HELM *) -(* *) -(* Ferruccio Guidi *) -(* Irene Schena *) -(* 10/09/2002 *) -(* *) -(* *) -(******************************************************************************) - +(* AUTOR: Ferruccio Guidi + *) (* output data structures ***************************************************) -type path = string * (string list) (* the name of an attribute *) +type path = string list (* the name of an attribute *) type value = string list (* the value of an attribute *) @@ -58,9 +49,7 @@ type result = resource_set type svar = string (* the name of a variable for a resource set *) -type rvar = string (* the name of a variable for a resource *) - -type vvar = string (* the name of a variable for an attribute value *) +type avar = string (* the name of a variable for a resource *) type inverse = bool @@ -68,35 +57,42 @@ type refine = RefineExact | RefineSub | RefineSuper -type assign = path * path - -type set_exp = SVar of svar - | RVar of rvar - | Ref of val_exp - | Pattern of val_exp - | 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 - | Diff of set_exp * set_exp - | LetSVar of svar * set_exp * set_exp - | LetVVar of vvar * val_exp * set_exp - -and boole_exp = False - | True - | Not of boole_exp - | Ex of rvar list * boole_exp - | And of boole_exp * boole_exp - | Or of boole_exp * boole_exp - | Sub of val_exp * val_exp - | Meet of val_exp * val_exp - | Eq of val_exp * val_exp - -and val_exp = Const of string list - | RefOf of set_exp - | Record of rvar * path - | VVar of vvar - | Property of inverse * refine * path * val_exp - | Fun of string * val_exp - -type query = set_exp +type main = path + +type pattern = bool + +type exp = path * (path option) + +type exp_list = exp list + +type allbut = bool + +type xml = bool + +type source = bool + +type gen = GenFJoin (* full union - with attr handling *) + | GenFMeet (* full intersection - with attr handling *) + +type query = Const of result + | SVar of svar + | AVar of avar + | Dot of avar * path + | Ex of avar list * query + | Select of avar * query * query + | Let of svar * query * query + | Fun of path * path list * query list + | Add of bool * groups * query + | For of gen * avar * query * query + | Property of inverse * refine * path * + main * istrue * isfalse list * exp_list * + pattern * query + +and groups = Attr of (path * query) list list + | From of avar + +and con = pattern * path * query + +and istrue = con list + +and isfalse = con list