Module Xquery_algebra_ast

module Xquery_algebra_ast: sig .. end

type aelement_test = 
| ASchemaElementTest of Namespace_symbols.relem_symbol
| AElementTest of (Namespace_symbols.relem_symbol * Namespace_symbols.rtype_symbol option)
option
type aattribute_test = 
| ASchemaAttributeTest of Namespace_symbols.rattr_symbol
| AAttributeTest of (Namespace_symbols.rattr_symbol * Namespace_symbols.rtype_symbol option)
option
type akind_test = 
| ADocumentKind of aelement_test option
| AElementKind of aelement_test
| AAttributeKind of aattribute_test
| APIKind of string option
| ACommentKind
| ATextKind
| AAnyKind
type aitemtype = 
| AITKindTest of akind_test
| AITTypeRef of Namespace_symbols.rtype_symbol
| AITItem
| AITNumeric
| AITAnyString
| AITAtomic of Namespace_symbols.rtype_symbol
| AITEmpty
type var_kind = 
| Immutable
| Mutable
type asequencetype_desc = aitemtype * Occurrence.occurrence_indicator option 
type asequencetype = {
   pasequencetype_desc : asequencetype_desc;
   pasequencetype_loc : Finfo.finfo;
}
type anode_test = 
| APNameTest of Namespace_symbols.anon_symbol
| APNodeKindTest of akind_test
type apattern = {
   papattern_desc : apattern_desc;
   papattern_loc : Finfo.finfo;
}
type apattern_desc = 
| ACase of asequencetype
| ADefault
type predicate_desc = 
| SimpleConjunct of int * int
| ComplexConjunct of predicate_desc * predicate_desc
| Disjunct of predicate_desc * predicate_desc
type afunction_signature = asequencetype list * asequencetype 
type aoverloaded_signature_table = (Xquery_common_ast.cfname * afunction_signature *
Xquery_common_ast.updating_modifier)
list
type algop_insert_location = 
| AOUAsLastInto
| AOUAsFirstInto
| AOUInto
| AOUAfter
| AOUBefore
type seq_group_name = Xquery_common_ast.cvname 
type group_desc = {
   group_by_names : seq_group_name list;
   induced_groups : seq_group_name list;
   must_be_valid : seq_group_name list;
   aggregate_name : asequencetype option * Xquery_common_ast.cvname;
}
type twig_node = {
   node_test : anode_test option;
   mutable out : Xquery_common_ast.crname option;
   mutable restore_out : bool;
   mutable child_twig : (Xquery_common_ast.axis * int) option;
   mutable pred_twigs : (Xquery_common_ast.axis * int) list;
   mutable requires_sbdo : bool * bool;
}
type twig_pattern = twig_node array 
type algop_expr_name = 
| AOEIf
| AOEWhile
| AOELetvar of (asequencetype option * Xquery_common_ast.cvname)
| AOETypeswitch of (apattern * Xquery_common_ast.cvname option) array
| AOEVar of Xquery_common_ast.cvname
| AOEScalar of Xquery_common_ast.literal
| AOESeq
| AOEEmpty
| AOEDocument
| AOEPI of Namespace_names.ncname * string
| AOEPIComputed
| AOEComment of string
| AOECommentComputed
| AOEText of string
| AOECharRef of int
| AOETextComputed
| AOEElem of Namespace_symbols.relem_symbol * Namespace_context.nsenv
| AOEAnyElem of Namespace_context.nsenv * Namespace_context.nsenv
| AOEAttr of Namespace_symbols.rattr_symbol
| AOEAnyAttr of Namespace_context.nsenv
| AOEError
| AOETreat of asequencetype
| AOEValidate of Xquery_common_ast.validation_mode
| AOECast of Namespace_context.nsenv * asequencetype
| AOECastable of Namespace_context.nsenv * asequencetype
| AOESome of asequencetype option * Xquery_common_ast.cvname
| AOEEvery of asequencetype option * Xquery_common_ast.cvname
| AOEInputTuple
| AOECallBuiltIn of (Xquery_common_ast.cfname * int)
* asequencetype option array
* asequencetype * Xquery_common_ast.updating_modifier
| AOECallOverloaded of (Xquery_common_ast.cfname * int)
* aoverloaded_signature_table
| AOECallUserDefined of (Xquery_common_ast.cfname * int)
* asequencetype option array
* asequencetype * Xquery_common_ast.updating_modifier
* bool
| AOEConvertSimple of Datatypes.atomic_type
| AOEPromoteNumeric of Datatypes.atomic_type
| AOEPromoteAnyString
| AOEUnsafePromoteNumeric of Datatypes.atomic_type
| AOEServerImplements of Namespace_names.ncname * string
| AOEExecute of Namespace_names.ncname * string
| AOEASyncExecute of Namespace_names.ncname * string
| AOEForServerClose of Namespace_names.ncname * string
| AOEEvalClosure
| AOECreateTuple of (asequencetype option * Xquery_common_ast.crname) array
| AOEAccessTuple of Xquery_common_ast.crname
| AOEConcatTuples
| AOEProject of Xquery_common_ast.crname array
| AOEMapFromItem of Xquery_common_ast.crname
| AOEMapToItem
| AOEMap
| AOENullMap of Xquery_common_ast.crname
| AOEMapIndex of Xquery_common_ast.crname
| AOEMapIndexStep of Xquery_common_ast.crname
| AOEMapConcat
| AOEOuterMapConcat of Xquery_common_ast.crname
| AOEProduct
| AOESelect of predicate_desc
| AOEJoin of predicate_desc
| AOELeftOuterJoin of (Xquery_common_ast.crname * predicate_desc)
| AOEGroupBy of group_desc list
| AOEOrderBy of Xquery_common_ast.stablekind
* (Xquery_common_ast.sortkind * Xquery_common_ast.emptysortkind) list
* aoverloaded_signature_table
| AOECopy
| AOEDelete
| AOEInsert of algop_insert_location
| AOERename of Namespace_context.nsenv
| AOEReplace of Xquery_common_ast.value_of_flag
| AOESnap of Xquery_common_ast.snap_modifier
| AOESet of Xquery_common_ast.cvname
| AOEImperativeSeq
| AOEParse of string
| AOETreeJoin of Xquery_common_ast.axis * anode_test
| AOETupleTreePattern of Xquery_common_ast.crname * twig_pattern
type input_signature = 
| NoInput
| OneInput of Xquery_physical_type_ast.physical_type
| TwoInput of (Xquery_physical_type_ast.physical_type *
Xquery_physical_type_ast.physical_type)
| ManyInput of Xquery_physical_type_ast.physical_type array
type tuple_fields = Xquery_common_ast.cvname list 
type variable_usage = 
| Never
| Once
| Many
| Redefined
type variable_use_count = Xquery_common_ast.cvname * (int * variable_usage) 
type tuple_field_use_count = variable_use_count 
type table_cardinality = 
| COne
| CMany
type cardinality = 
| NoTable
| Table of table_cardinality
type treejoin_path = 
| Empty
| Variable of Xquery_common_ast.cvname
| Step of Xquery_common_ast.axis * anode_test
| JoinChild of treejoin_path * treejoin_path
| Union of treejoin_path * treejoin_path
type free_variable_desc = {
   mutable use_counts : variable_use_count list;
   mutable bound_usage_counts : variable_use_count list;
   mutable accessed_fields : tuple_fields;
   mutable returned_fields : tuple_fields;
   mutable tuple_field_use_counts : tuple_field_use_count list *
tuple_fields * cardinality
;
   mutable returned_path : treejoin_path;
   mutable accessed_path : treejoin_path;
   mutable updated_path : treejoin_path;
}
type expr_eval_sig = Xquery_physical_algebra_ast.physop_expr_name *
input_signature * Xquery_physical_type_ast.physical_type
type ('a, 'b) aalgop_sub_exprs = 
| NoSub
| OneSub of ('a, 'b) aalgop_expr
| TwoSub of ('a, 'b) aalgop_expr
* ('a, 'b) aalgop_expr
| ManySub of ('a, 'b) aalgop_expr array
type ('a, 'b) aalgop_expr = {
   mutable palgop_expr_name : algop_expr_name;
   mutable psub_expression : ('a, 'b) aalgop_sub_exprs;
   mutable pdep_sub_expression : ('a, 'b) aalgop_sub_exprs;
   palgop_expr_eval : 'a Pervasives.ref;
   mutable palgop_expr_eval_sig : expr_eval_sig option;
   annotation : 'b;
   mutable compile_annotations : free_variable_desc option;
   palgop_expr_origin : Xquery_ast.expr_handle;
   palgop_expr_loc : Finfo.finfo;
}
type algop_decl_name = 
| AOEVarDecl of (asequencetype option * Xquery_common_ast.cvname)
| AOEVarDeclExternal of (asequencetype option * Xquery_common_ast.cvname)
| AOEVarDeclImported of (asequencetype option * Xquery_common_ast.cvname)
| AOEValueIndexDecl of string
| AOENameIndexDecl of Namespace_symbols.relem_symbol
type ('a, 'b, 'c) aalgop_decl = {
   alg_decl_name : algop_decl_name;
   alg_decl_eval : 'c Pervasives.ref;
   mutable alg_decl_indep : ('a, 'b) aalgop_sub_exprs;
   mutable alg_decl_dep : ('a, 'b) aalgop_sub_exprs;
   alg_decl_annotation : 'b;
   alg_decl_loc : Finfo.finfo;
}
type ('a, 'b) aalgop_function_plan = 
| AOEFunctionImported
| AOEFunctionUser of ('a, 'b) aalgop_expr
type ('a, 'b) aalgop_function_body = {
   palgop_func_formal_args : Xquery_common_ast.cvname array;
   palgop_func_output_type : asequencetype option;
   palgop_func_optimized_logical_plan : ('a, 'b) aalgop_function_plan Pervasives.ref;
   palgop_func_physical_plan : ('a, 'b) aalgop_expr option Pervasives.ref;
}
type ('a, 'b) aalgop_function_decl = {
   palgop_function_decl_desc : ('a, 'b) aalgop_function_decl_desc;
   palgop_function_decl_loc : Finfo.finfo;
}
type ('a, 'b) aalgop_function_decl_desc = (Xquery_common_ast.cfname * int) * afunction_signature *
('a, 'b) aalgop_function_body *
Xquery_common_ast.updating_modifier
type ('a, 'b, 'c) aalgop_prolog = {
   palgop_prolog_functions : ('a, 'b) aalgop_function_decl list;
   palgop_prolog_vars : ('a, 'b, 'c) aalgop_decl list;
   palgop_prolog_indices : ('a, 'b, 'c) aalgop_decl list;
}
type ('a, 'b, 'c) aalgop_xmodule = {
   palgop_module_prolog : ('a, 'b, 'c) aalgop_prolog;
   palgop_module_statements : ('a, 'b) aalgop_expr list;
}