type vvar = string (* the name of a variable for an attribute value *)
-type refine_op = Exact
- | Sub
- | Super
+type refine_op = ExactOp
+ | SubOp
+ | SuperOp
-type attr_list = vvar list
+type path = string list
+
+type vvar_list = vvar list
type set_exp = SVar of svar
| RVar of rvar
| Ref of val_exp
| Pattern of val_exp
- | Relation of refine_op * string * set_exp * attr_list
+ | Relation of refine_op * path * set_exp * vvar_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
- | Let of svar * 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 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
| Eq of val_exp * val_exp
and val_exp = Const of string list
- | Refof of set_exp
+ | RefOf of set_exp
| Record of rvar * vvar
+ | VVar of vvar
| Fun of string * val_exp
- | Attribute of refine_op * string * val_exp
+ | Attribute of refine_op * path * val_exp
+
+type query = set_exp
(* output data structures ***************************************************)
type resource = string * attribute_set (* an attributed URI *)
type resource_set = resource list (* the query result *)
+
+type result = resource_set