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

(* $Id: path_analysis.mli,v 1.3 2002/10/17 20:56:46 amelie Exp $ *)

(* Path Analysis interface - Amelie *)

open Error
open Xquery_ast

open Path_struct
open Path_env

(* Applies final serialization operation on the path sequences *)

val serialize : Path_struct.path_sequence * Path_struct.path_sequence -> Path_struct.path_sequence


(* Core expression level path analysis *)

val cexpr_path_analysis : Path_env.path_env -> Xquery_ast.cexpr -> Path_struct.path_sequence * Path_struct.path_sequence

val cexpr_path_analysis_optim : Path_env.path_env -> Xquery_ast.cexpr -> Path_struct.path_sequence * Path_struct.path_sequence * Path_varlists.optim_vars


(* Query level path analysis *)

val query_path_analysis : Xquery_ast.cquery_module -> Path_struct.path_sequence

val query_path_analysis_optim : Xquery_ast.cquery_module -> Path_struct.path_sequence


(* Printing of analysis results *)

val print_intermediate_analysis : Format.formatter -> Path_struct.path_sequence * Path_struct.path_sequence -> unit

val print_full_analysis : Format.formatter -> Path_struct.path_sequence -> unit

