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 (* output data structures ***************************************************)
40 type path = string * (string list) (* the name of an attribute *)
42 type value = string list (* the value of an attribute *)
44 type attribute = path * value (* an attribute *)
46 type attribute_group = attribute list (* a group of attributes *)
48 type attribute_set = attribute_group list (* the attributes of an URI *)
50 type resource = string * attribute_set (* an attributed URI *)
52 type resource_set = resource list (* the query result *)
54 type result = resource_set
57 (* input data structures ****************************************************)
59 type svar = string (* the name of a variable for a resource set *)
61 type rvar = string (* the name of a variable for a resource *)
63 type vvar = string (* the name of a variable for an attribute value *)
67 type refine = RefineExact
71 type assign = path * path
73 type set_exp = SVar of svar
77 | Relation of inverse * refine * path * set_exp * assign list
78 | Select of rvar * set_exp * boole_exp
79 | Union of set_exp * set_exp
80 | Intersect of set_exp * set_exp
81 | Diff of set_exp * set_exp
82 | LetSVar of svar * set_exp * set_exp
83 | LetVVar of vvar * val_exp * set_exp
88 | Ex of rvar list * boole_exp
89 | And of boole_exp * boole_exp
90 | Or of boole_exp * boole_exp
91 | Sub of val_exp * val_exp
92 | Meet of val_exp * val_exp
93 | Eq of val_exp * val_exp
95 and val_exp = Const of string list
97 | Record of rvar * path
99 | Property of inverse * refine * path * val_exp
100 | Fun of string * val_exp