(* Copyright (C) 2000, HELM Team. * * This file is part of HELM, an Hypertextual, Electronic * Library of Mathematics, developed at the Computer Science * Department, University of Bologna, Italy. * * HELM is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * HELM is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with HELM; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. * * For details, see the HELM World-Wide-Web page, * http://www.cs.unibo.it/helm/. *) (******************************************************************************) (* *) (* PROJECT HELM *) (* *) (* Ferruccio Guidi *) (* Irene Schena *) (* 10/09/2002 *) (* *) (* *) (******************************************************************************) (* input data structures ****************************************************) 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 refine_op = ExactOp | SubOp | SuperOp 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 bool * 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 | 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 * vvar | VVar of vvar | Attribute of bool * refine_op * path * val_exp | Fun of string * val_exp type query = set_exp (* output data structures ***************************************************) type value = string list (* the value of an attribute *) type attribute = string * value (* 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