sig
type parsing_phase_handler = {
parse_statement :
Parse_context.parse_context ->
Galax_io.input_spec -> Xquery_ast.statement;
parse_prolog :
Parse_context.parse_context ->
Galax_io.input_spec -> Parse_context.parse_context * Xquery_ast.prolog;
parse_library_module :
Parse_context.parse_context ->
Galax_io.input_spec ->
Parse_context.parse_context * Xquery_ast.library_module;
parse_main_module :
Parse_context.parse_context ->
Galax_io.input_spec ->
Parse_context.parse_context * Xquery_ast.main_module;
}
type preprocessing_phase_handler = {
preprocess_prolog :
Processing_context.processing_context ->
Xquery_ast.prolog ->
Norm_context.norm_interface_table * Xquery_ast.library_module list;
preprocess_library_module :
Processing_context.processing_context ->
Xquery_ast.library_module ->
Norm_context.norm_interface_table * Xquery_ast.library_module list;
preprocess_main_module :
Processing_context.processing_context ->
Xquery_ast.main_module ->
Norm_context.norm_interface_table * Xquery_ast.library_module list;
}
type normalization_phase_handler = {
normalize_statement :
Norm_context.norm_context ->
Xquery_ast.statement -> Xquery_core_ast.acstatement;
normalize_prolog :
Norm_context.norm_interface_table * Norm_context.norm_context ->
Xquery_ast.prolog ->
Norm_context.norm_context * Xquery_core_ast.acprolog;
normalize_library_module :
Norm_context.norm_interface_table * Norm_context.norm_context ->
Xquery_ast.library_module ->
Norm_context.norm_context * Xquery_core_ast.acxmodule;
normalize_main_module :
Norm_context.norm_interface_table * Norm_context.norm_context ->
Xquery_ast.main_module ->
Norm_context.norm_context * Xquery_core_ast.acxmodule;
}
type rewriting_phase_handler = {
rewriting_statement :
Typing_context.static_context ->
Xquery_core_ast.acstatement -> Xquery_core_ast.acstatement;
rewriting_prolog :
Typing_context.static_context ->
Xquery_core_ast.acprolog ->
Typing_context.static_context * Xquery_core_ast.acprolog;
rewriting_library_module :
Typing_context.static_context ->
Xquery_core_ast.acxmodule ->
Typing_context.static_context * Xquery_core_ast.acxmodule;
rewriting_main_module :
Typing_context.static_context ->
Xquery_core_ast.acxmodule ->
Typing_context.static_context * Xquery_core_ast.acxmodule;
}
type factorization_phase_handler = {
factorize_statement :
Typing_context.static_context ->
Xquery_core_ast.acstatement -> Xquery_core_ast.acstatement;
factorize_prolog :
Typing_context.static_context ->
Xquery_core_ast.acprolog ->
Typing_context.static_context * Xquery_core_ast.acprolog;
factorize_library_module :
Typing_context.static_context ->
Xquery_core_ast.acxmodule ->
Typing_context.static_context * Xquery_core_ast.acxmodule;
factorize_main_module :
Typing_context.static_context ->
Xquery_core_ast.acxmodule ->
Typing_context.static_context * Xquery_core_ast.acxmodule;
}
type compile_phase_handler = {
compile_statement :
Logical_algebra_types.logical_compile_context ->
Xquery_core_ast.acstatement -> Logical_algebra_types.logical_algop_expr;
compile_prolog :
Logical_algebra_types.logical_compile_context ->
Xquery_core_ast.acprolog ->
Logical_algebra_types.logical_compile_context *
Logical_algebra_types.logical_algop_prolog;
compile_library_module :
Logical_algebra_types.logical_compile_context ->
Xquery_core_ast.acxmodule ->
Logical_algebra_types.logical_compile_context *
Logical_algebra_types.logical_algop_xmodule;
compile_main_module :
Logical_algebra_types.logical_compile_context ->
Xquery_core_ast.acxmodule ->
Logical_algebra_types.logical_compile_context *
Logical_algebra_types.logical_algop_xmodule;
}
type optimization_phase_handler = {
optimize_statement :
Logical_algebra_types.logical_compile_context ->
Logical_algebra_types.logical_algop_expr ->
Logical_algebra_types.logical_algop_expr;
optimize_prolog :
Logical_algebra_types.logical_compile_context ->
Logical_algebra_types.logical_algop_prolog ->
Logical_algebra_types.logical_compile_context *
Logical_algebra_types.logical_algop_prolog;
optimize_library_module :
Logical_algebra_types.logical_compile_context ->
Logical_algebra_types.logical_algop_xmodule ->
Logical_algebra_types.logical_compile_context *
Logical_algebra_types.logical_algop_xmodule;
optimize_main_module :
Logical_algebra_types.logical_compile_context ->
Logical_algebra_types.logical_algop_xmodule ->
Logical_algebra_types.logical_compile_context *
Logical_algebra_types.logical_algop_xmodule;
}
type selection_phase_handler = {
selection_statement :
Compiled_program_units.compiled_program * string *
Code_selection_context.code_selection_context ->
Logical_algebra_types.logical_algop_expr ->
Code_selection_context.code_selection_context * Algebra_type.algop_expr;
selection_prolog :
Compiled_program_units.compiled_program * string *
Code_selection_context.code_selection_context ->
Logical_algebra_types.logical_algop_prolog ->
Code_selection_context.code_selection_context *
Algebra_type.algop_prolog;
selection_library_module :
Compiled_program_units.compiled_program * string *
Code_selection_context.code_selection_context ->
Logical_algebra_types.logical_algop_xmodule ->
Code_selection_context.code_selection_context *
Algebra_type.algop_xmodule;
selection_main_module :
Compiled_program_units.compiled_program * string *
Code_selection_context.code_selection_context ->
Logical_algebra_types.logical_algop_xmodule ->
Code_selection_context.code_selection_context *
Algebra_type.algop_xmodule;
}
type evaluation_phase_handler = {
eval_statement :
Execution_context.algebra_context ->
Algebra_type.algop_expr -> Physical_value.physical_value;
eval_prolog :
Execution_context.algebra_context ->
Algebra_type.algop_prolog ->
Execution_context.algebra_context * Physical_value.physical_value list;
eval_library_module :
Execution_context.algebra_context ->
Algebra_type.algop_xmodule ->
Execution_context.algebra_context * Physical_value.physical_value list;
eval_main_module :
Execution_context.algebra_context ->
Algebra_type.algop_xmodule ->
Execution_context.algebra_context * Physical_value.physical_value list;
}
type phase_handler = {
parsing_phase : Procmod_types.parsing_phase_handler;
preprocessing_phase : Procmod_types.preprocessing_phase_handler;
normalization_phase : Procmod_types.normalization_phase_handler;
rewriting_phase : Procmod_types.rewriting_phase_handler;
factorization_phase : Procmod_types.factorization_phase_handler;
compile_phase : Procmod_types.compile_phase_handler;
optimization_phase : Procmod_types.optimization_phase_handler;
selection_phase : Procmod_types.selection_phase_handler;
evaluation_phase : Procmod_types.evaluation_phase_handler;
}
end