Module AVATAR.E
module Ctx : Libzipperposition.Ctx.Smodule C : Libzipperposition.Clause.S with module Ctx = Ctxmodule ProofState : Libzipperposition.ProofState.S with module C = C and module Ctx = Ctxtype generate_rule= full:bool -> unit -> C.t listGeneration of clauses regardless of current clause.
- parameter full
if true, perform more thorough checks
type clause_elim_rule= unit -> unitEliminates clauses from the proof state using algorithms like blocked clause elimination and similar
type binary_inf_rule= inf_ruletype unary_inf_rule= inf_ruletype simplify_rule= C.t -> C.t Libzipperposition.SimplM.tSimplify the clause structurally (basic simplifications), in the simplification monad.
(c, `Same)means the clause has not been simplified;(c, `New)means the clause has been simplified at least once
type active_simplify_rule= simplify_ruletype rw_simplify_rule= simplify_ruletype backward_simplify_rule= C.t -> C.ClauseSet.tbackward simplification by a unit clause. It returns a set of active clauses that can potentially be simplified by the given clause.
backward_simplify ctherefore returns a subset ofProofState.ActiveSet.clauses ()
type redundant_rule= C.t -> boolcheck whether the clause is redundant w.r.t the set
type backward_redundant_rule= C.ClauseSet.t -> C.t -> C.ClauseSet.tfind redundant clauses in
ProofState.ActiveSetw.r.t the clause. first param is the set of already known redundant clause, the rule should add clauses to it
type immediate_simplification_rule= C.t -> C.t Iter.t -> C.t Iter.t optionFollowing Kotelnikov's iProver superposition implementation, try to simplify given clause (first argument) using a set of clauses (second argument). If simplification suceeded, then a set of clauses to be injected into passive set is returned.
type is_trivial_trail_rule= Libzipperposition.Trail.t -> boolRule that checks whether the trail is trivial (a tautology)
type is_trivial_rule= C.t -> boolRule that checks whether the clause is trivial (a tautology)
type term_rewrite_rule= Logtk.Term.t -> (Logtk.Term.t * Logtk.Proof.parent list) optionRewrite rule on terms
type term_norm_rule= Logtk.Term.t -> Logtk.Term.t optionNormalization rule on terms
type lit_rewrite_rule= Logtk.Literal.t -> (Logtk.Literal.t * Logtk.Proof.parent list * Logtk.Proof.tag list) optionRewrite rule on literals
type multi_simpl_rule= C.t -> C.t list option(maybe) rewrite a clause to a set of clauses. Must return
Noneif the clause is unmodified
type 'a conversion_result=|CR_skiprule didn't fire
|CR_dropdrop the clause from the proof state
|CR_add of 'aadd this to the result
|CR_return of 'ashortcut the remaining rules, return this
type clause_conversion_rule= Logtk.Statement.clause_t -> C.t list conversion_resultA hook to convert a particular statement into a list of clauses
Modify the Env
val add_passive : C.t Iter.t -> unitAdd passive clauses
val add_active : C.t Iter.t -> unitAdd active clauses
val add_simpl : C.t Iter.t -> unitAdd simplification clauses
val remove_passive : C.t Iter.t -> unitRemove passive clauses
val remove_active : C.t Iter.t -> unitRemove active clauses
val remove_simpl : C.t Iter.t -> unitRemove simplification clauses
val get_passive : unit -> C.t Iter.tPassive clauses
val get_active : unit -> C.t Iter.tActive clauses
val add_binary_inf : string -> binary_inf_rule -> unitAdd a binary inference rule
val add_unary_inf : string -> unary_inf_rule -> unitAdd a unary inference rule
val add_rw_simplify : rw_simplify_rule -> unitAdd forward rewriting rule
val add_active_simplify : active_simplify_rule -> unitAdd simplification w.r.t active set
val add_backward_simplify : backward_simplify_rule -> unitAdd simplification of the active set
val add_redundant : redundant_rule -> unitAdd redundancy criterion w.r.t. the active set
val add_backward_redundant : backward_redundant_rule -> unitAdd rule that finds redundant clauses within active set
val add_basic_simplify : simplify_rule -> unitAdd basic simplification rule
val add_unary_simplify : simplify_rule -> unitAdd unary simplification rule (not dependent on proof state)
val add_multi_simpl_rule : priority:int -> multi_simpl_rule -> unitAdd a multi-clause simplification rule
val add_single_step_multi_simpl_rule : multi_simpl_rule -> unitAdd a multi-clause simplification rule, that is going to be applied only once, not in a fixed-point manner
val add_cheap_multi_simpl_rule : multi_simpl_rule -> unitAdd an efficient multi-clause simplification rule, that will be used to simplify newly generated clauses when they are moved from unprocessed to passive set.
val add_is_trivial_trail : is_trivial_trail_rule -> unitAdd tautology detection rule
val add_is_trivial : is_trivial_rule -> unitAdd tautology detection rule
val add_rewrite_rule : string -> term_rewrite_rule -> unitAdd a term rewrite rule
val set_ho_normalization_rule : string -> term_norm_rule -> unitAdd a ho norm rule
val get_ho_normalization_rule : unit -> term_norm_ruleval add_immediate_simpl_rule : immediate_simplification_rule -> unitval add_lit_rule : string -> lit_rewrite_rule -> unitAdd a literal rewrite rule
val add_generate : priority:int -> string -> generate_rule -> unitAdd a generation rule with assigned priority. Rules with higher priority will be tried first.
val add_clause_elimination_rule : priority:int -> string -> clause_elim_rule -> unitval cr_skip : _ conversion_resultval cr_return : 'a -> 'a conversion_resultval cr_add : 'a -> 'a conversion_resultval add_clause_conversion : clause_conversion_rule -> unitval add_step_init : (unit -> unit) -> unitadd a function to call before each saturation step
Use the Env
val multi_simplify : C.t -> C.t list optionCan we simplify the clause into a List of simplified clauses?
val params : Libzipperposition.Params.tval get_empty_clauses : unit -> C.ClauseSet.tSet of known empty clauses
val get_some_empty_clause : unit -> C.t optionSome empty clause, if present, otherwise None
val on_start : unit Logtk.Signal.tTriggered before starting saturation
val on_input_statement : Logtk.Statement.clause_t Logtk.Signal.tTriggered on every input statement
val on_forward_simplified : (C.t * C.t option) Logtk.Signal.tTriggered when after the clause set is fully forward-simplified. First argument is the original clause c and the second one is Some c' if c simplifies into c' or None if c is deemed redundant
val convert_input_statements : Logtk.Statement.clause_t CCVector.ro_vector -> C.t Libzipperposition.Clause.setsConvert raw input statements into clauses, triggering
on_input_statement
val on_empty_clause : C.t Logtk.Signal.tSignal triggered when an empty clause is found
val ord : unit -> Logtk.Ordering.tval precedence : unit -> Logtk.Precedence.tval signature : unit -> Logtk.Signature.tval pp : unit CCFormat.printerval pp_full : unit CCFormat.printer
High level operations
val stats : unit -> statsCompute stats
val next_passive : unit -> C.t optionExtract next passive clause
val do_generate : full:bool -> unit -> C.t Iter.tdo generating inferences
val do_clause_eliminate : unit -> unitchanges the proof state by running registered clause elimination procedures and removing all the eliminated clauses from the proof state
val is_trivial_trail : Libzipperposition.Trail.t -> boolCheck whether the trail is trivial
val is_trivial : C.t -> boolCheck whether the clause is trivial
val is_active : C.t -> boolIs the clause in the active set
val is_passive : C.t -> boolIs the clause a passive clause?
val basic_simplify : simplify_ruleBasic (and fast) simplifications
val unary_simplify : simplify_ruleSimplify the clause.
val backward_simplify : C.t -> C.ClauseSet.t * C.t Iter.tPerform backward simplification with the given clause. It returns the CSet of clauses that become redundant, and the sequence of those very same clauses after simplification.
val simplify_active_with : (C.t -> C.t list option) -> unitCan be called when a simplification relation becomes stronger, with the strengthened relation. (e.g. new axioms should be declared because a theory was detected). This will go through the whole active set, trying to simplify clauses with the given function. Simplified clauses will be put back in the passive set.
val forward_simplify : simplify_ruleSimplify the clause w.r.t to the active set and experts
val cheap_multi_simplify : C.t -> C.t list optionCheap simplifications that can result in multiple clauses (e.g. AVATAR splitting)
val immediate_simplify : C.t -> C.t Iter.t -> C.t Iter.tSimplify given clause using its children. Given clause is removed from active set and result of this rule is added to passive set, if any of the registered rules suceeded
val is_redundant : C.t -> boolIs the given clause redundant w.r.t the active set?
val subsumed_by : C.t -> C.ClauseSet.tList of active clauses subsumed by the given clause
val all_simplify : C.t -> C.t list Libzipperposition.SimplM.tUse all simplification rules to convert a clause into a set of maximally simplified clause (or
[]if they are all trivial).
val step_init : unit -> unitcall all functions registered with
add_step_init
Misc
val flex_state : unit -> Logtk.Flex_state.tState inherited from configuration
val update_flex_state : (Logtk.Flex_state.t -> Logtk.Flex_state.t) -> unitupdate_flex_state fchangesflex_state ()usingf
val flex_add : 'a Logtk.Flex_state.key -> 'a -> unitadd
k -> vto the flex state
val flex_get : 'a Logtk.Flex_state.key -> 'aflex_get kis the same asFlex_state.get_exn k (flex_state ()).- raises Not_found
if the key is not present
val on_pred_var_elimination : (C.t * Logtk.Term.t) Logtk.Signal.tthis signal is raised if a formula that universally quantifies a predicate removes that predicate and rules that want to instantiate it early should listen to this
val on_pred_skolem_introduction : (C.t * Logtk.Term.t) Logtk.Signal.tthis signal is raised when a predicate Skolem is introduced