Module Libzipperposition_phases.Phases
Phases of the Prover
To process a file, the prover goes through a sequence of phases that are used to build values. This module reifies the phases.
Phases
type env_with_clauses=|Env_clauses : 'c Libzipperposition.Env.packed * 'c Libzipperposition.Clause.sets -> env_with_clausestype env_with_result=|Env_result : 'c Libzipperposition.Env.packed * Libzipperposition.Saturate.szs_status -> env_with_resulttype errcode= inttype prelude= Logtk.UntypedAST.statement Iter.ttype ('ret, 'before, 'after) phase=|Init : (unit, _, [ `Init ]) phase|Setup_gc : (unit, [ `Init ], [ `Init ]) phase|Setup_signal : (unit, [ `Init ], [ `Init ]) phase|Parse_CLI : (filename list * Libzipperposition.Params.t, [ `Init ], [ `Parse_cli ]) phase|LoadExtensions : (Libzipperposition.Extensions.t list, [ `Parse_cli ], [ `LoadExtensions ]) phase|Parse_prelude : (prelude, [ `LoadExtensions ], [ `Parse_prelude ]) phase|Start_file : (filename, [ `Parse_prelude ], [ `Start_file ]) phase|Parse_file : (Logtk.Input_format.t * Logtk.UntypedAST.statement Iter.t, [ `Start_file ], [ `Parse_file ]) phase|Typing : (Logtk.TypeInference.typed_statement CCVector.ro_vector, [ `Parse_file ], [ `Typing ]) phase|CNF : (Logtk.Statement.clause_t CCVector.ro_vector, [ `Typing ], [ `CNF ]) phase|Compute_prec : (Logtk.Precedence.t, [ `CNF ], [ `Precedence ]) phase|Compute_ord_select : (Logtk.Ordering.t * Libzipperposition.Selection.t, [ `Precedence ], [ `Compute_ord_select ]) phase|MakeCtx : ((module Libzipperposition.Ctx.S), [ `Compute_ord_select ], [ `MakeCtx ]) phase|MakeEnv : (env_with_clauses, [ `MakeCtx ], [ `MakeEnv ]) phase|Pre_saturate : ('c Libzipperposition.Env.packed * Libzipperposition.Saturate.szs_status * 'c Libzipperposition.Clause.sets, [ `MakeEnv ], [ `Pre_saturate ]) phase|Saturate : (env_with_result, [ `Pre_saturate ], [ `Saturate ]) phase|Print_result : (unit, [ `Saturate ], [ `Print_result ]) phase|Print_dot : (unit, [ `Print_result ], [ `Print_dot ]) phase|Check_proof : (errcode, [ `Print_dot ], [ `Check_proof ]) phase|Print_stats : (unit, [ `Check_proof ], [ `Print_stats ]) phase|Exit : (unit, _, [ `Exit ]) phasetype any_phase=|Any_phase : (_, _, _) phase -> any_phaseA phase hidden in an existential type
Main Type
type (+'a, 'p1, 'p2) tMonad type, representing an action starting at phase
'p1and stopping at phase'p2
val string_of_phase : (_, _, _) phase -> stringval string_of_any_phase : any_phase -> stringval return : 'a -> ('a, 'p, 'p) tReturn a value into the monad
val fail : string -> (_, _, _) tFail with the given error message
val return_phase : 'a -> ('a, [ `InPhase of 'p2 ], 'p2) tFinish the given phase
val return_phase_err : 'a or_error -> ('a, [ `InPhase of 'p2 ], 'p2) tval current_phase : (any_phase, _, 'p2) tGet the current phase
val with_phase : ('a, 'p1, 'p2) phase -> f:(unit -> 'a) -> ('a, 'p1, 'p2) tStart phase, call
f ()to get the result, return its result usingreturn_phase
val with_phase1 : ('b, 'p1, 'p2) phase -> f:('a -> 'b) -> 'a -> ('b, 'p1, 'p2) tval with_phase2 : ('c, 'p1, 'p2) phase -> f:('a -> 'b -> 'c) -> 'a -> 'b -> ('c, 'p1, 'p2) tval bind : ('a, 'p_before, 'p_middle) t -> f:('a -> ('b, 'p_middle, 'p_after) t) -> ('b, 'p_before, 'p_after) tbind state fcallsfto go one step further fromstate
val fold_l : f:('a -> 'b -> ('a, 'p, 'p) t) -> x:'a -> 'b list -> ('a, 'p, 'p) tval run_parallel : (errcode, 'p1, 'p2) t list -> (errcode, 'p1, 'p2) trun_sequentiel lruns each action of the list in succession, restarting every time with the initial state (once an action has finished, its state is discarded). Only the very last state is kept. If any errcode is non-zero, then the evaluation stops with this errcode
module Infix : sig ... endval empty_state : Logtk.Flex_state.tval get : (Logtk.Flex_state.t, 'a, 'a) tval set : Logtk.Flex_state.t -> (unit, 'a, 'a) tval get_key : 'a Logtk.Flex_state.key -> ('a, 'b, 'b) tget_key kreturns the value associated withkin the state
val set_key : 'a Logtk.Flex_state.key -> 'a -> (unit, 'b, 'b) tval update : f:(Logtk.Flex_state.t -> Logtk.Flex_state.t) -> (unit, 'a, 'a) tupdate ~fchanges the state usingf
val run_with : Logtk.Flex_state.t -> ('a, [ `Init ], [ `Exit ]) t -> (Logtk.Flex_state.t * 'a) or_errorrun_with state mexecutes the actions inmstarting withstate, returning some value (or error) and the final state.
val run : ('a, [ `Init ], [ `Exit ]) t -> (Logtk.Flex_state.t * 'a) or_errorrun misrun_with empty_state m
module Key : sig ... end