(***********************************************************************)
(*                                                                     *)
(*                                 GALAX                               *)
(*                              XQuery Engine                          *)
(*                                                                     *)
(*  Copyright 2001-2003, Lucent Technologies.                          *)
(*  Distributed only by permission.                                    *)
(*                                                                     *)
(***********************************************************************)

(* $Id: rewrite_main.mli,v 1.2 2003/05/28 14:47:38 simeon Exp $ *)

(* Module Rewrite_main
   Description:
     This module contains the top-level rewriting engine operating on
     the XQuery core.
*)

(* Rewriting of individual expressions and updates *)

val rewrite_cexpr   : Static_context.static_context -> Xquery_ast.cexpr -> Xquery_ast.cexpr
val rewrite_cupdate : Static_context.static_context -> Xquery_ast.cupdate -> Xquery_ast.cupdate

(* Rewriting of individual expressions and updates *)

val rewrite_cstatement : Static_context.static_context -> Xquery_ast.cstatement -> Xquery_ast.cstatement

(* Rewriting of complete modules *)

val rewrite_module : Static_context.static_context -> Xquery_ast.cquery_module -> Xquery_ast.cquery_module

