1 (* Copyright (C) 2000, HELM Team.
3 * This file is part of HELM, an Hypertextual, Electronic
4 * Library of Mathematics, developed at the Computer Science
5 * Department, University of Bologna, Italy.
7 * HELM is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * HELM is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with HELM; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 * For details, see the HELM World-Wide-Web page,
23 * http://www.cs.unibo.it/helm/.
26 (******************************************************************************)
30 (* Ferruccio Guidi <fguidi@cs.unibo.it> *)
31 (* Irene Schena <schena@cs.unibo.it> *)
35 (******************************************************************************)
38 (* input data structures ****************************************************)
40 type svar = string (* the name of a variable for a resource set *)
42 type rvar = string (* the name of a variable for a resource *)
44 type vvar = string (* the name of a variable for an attribute value *)
46 type refine_op = ExactOp
50 type path = string list
52 type vvar_list = vvar list
54 type set_exp = SVar of svar
58 | Relation of refine_op * path * set_exp * vvar_list
59 | Select of rvar * set_exp * boole_exp
60 | Union of set_exp * set_exp
61 | Intersect of set_exp * set_exp
62 | Diff of set_exp * set_exp
63 | LetSVar of svar * set_exp * set_exp
64 | LetVVar of vvar * val_exp * set_exp
69 | Ex of rvar list * boole_exp
70 | And of boole_exp * boole_exp
71 | Or of boole_exp * boole_exp
72 | Sub of val_exp * val_exp
73 | Meet of val_exp * val_exp
74 | Eq of val_exp * val_exp
76 and val_exp = Const of string list
78 | Record of rvar * vvar
80 | Fun of string * val_exp
81 | Attribute of refine_op * path * val_exp
86 (* output data structures ***************************************************)
88 type value = string list (* the value of an attribute *)
90 type attribute = string * value (* an attribute *)
92 type attribute_group = attribute list (* a group of attributes *)
94 type attribute_set = attribute_group list (* the attributes of an URI *)
96 type resource = string * attribute_set (* an attributed URI *)
98 type resource_set = resource list (* the query result *)
100 type result = resource_set