(***********************************************************************)
(*                                                                     *)
(*                                 GALAX                               *)
(*                           XML Query Engine                          *)
(*                                                                     *)
(*  Copyright 2000, Lucent Technologies.                               *)
(*  Distributed only by permission.                                    *)
(*                                                                     *)
(***********************************************************************)

(* $Id: bound.mli,v 1.3 2002/03/06 21:29:33 simeon Exp $ *)

(* the type 'bound' corresponds to minOccur and maxOccur *)

type bound =
  | UP_INT of int
  | UNBOUNDED

(* operations on bounds *)

val bound: int -> bound
val unbounded: bound

val ub_max: bound -> bound -> bound
val ub_min: bound -> bound -> bound

val ub_add: bound -> bound -> bound
val ub_mult: bound -> bound -> bound

val mult: bound * bound -> bound
val minus: int -> bound -> bound
val equal: bound -> bound -> bool
val le: bound -> bound -> bool

(* prints bounds *)

val string_of_bound : bound -> string

(* Approximate bounds to +,?,* *)

val approximate_bounds : (bound * bound) -> (bound * bound)

