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 (* AUTOR: Ferruccio Guidi <fguidi@cs.unibo.it>
29 type value = string list (* a linearized attribute value *)
31 type path = string list (* the name of an attribute *)
33 module type Type = sig
35 type group (* an group of attribures *)
37 type avs (* a set of attributed values *)
40 | Single of (string * group list)
41 | Many of (string * group list)
46 val grp_make : path -> string -> group
48 val grp_union : group -> group -> group
50 val grp_read : group -> path -> avs
52 val grps_make : group list -> group -> group list
56 val make : string -> group -> avs
58 val iter : ('a -> string -> bool -> 'a) -> 'a -> avs -> 'a
60 val x_iter : ('a -> string -> group list -> bool -> 'a) ->
63 val x_grp_iter : ('a -> path -> value -> bool -> 'a) -> 'a -> group -> 'a
65 val single : avs -> string option
67 val sub : avs -> avs -> bool
69 val meet : avs -> avs -> bool
71 val eq : avs -> avs -> bool
73 val union : avs -> avs -> avs (* without attr. distribution *)
75 val intersect : avs -> avs -> avs (* without attr. distribution *)
77 val diff : avs -> avs -> avs
79 val d_union : avs -> avs -> avs (* with attr. distribution *)
81 val peek : avs -> peek_t
83 val optimize : avs -> avs