123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141(* This file is free software, part of Zipperposition. See file "license" for more details. *)typeprofile=|P_default|P_bfs|P_almost_bfs|P_explore|P_ground|P_goal|P_conj_rel|P_conj_rel_var|P_ho_weight|P_ho_weight_init|P_avoid_expensive(** {1 A priority queue of clauses, purely functional} *)moduletypeS=sigmoduleC:Clause_intf.Svalregister_conjecture_clause:C.t->unit(** {5 Weight functions} *)moduleWeightFun:sigtypet=C.t->int(** attribute a weight to a clause. The smaller, the better (lightweight
clauses will be favored). A weight must always be positive;
the weight of the empty clause should alwyays be 0. *)valof_string:string->t(** parse string description of weight function and return it *)valdefault:t(** Use {!Literal.heuristic_weight} *)valpenalty:t(** Returns the penalty of the clause *)valfavor_all_neg:t(** Favor clauses with only negative ground lits *)valfavor_non_all_neg:t(** Favor clauses that have at least one non-(ground negative) lit *)valfavor_ground:tvalfavor_horn:tvalfavor_goal:t(** The closest a clause is from the initial goal, the lowest its weight.
Some threshold is used for clauses that are too far away *)valconj_relative:?distinct_vars_mul:float->?parameters_magnitude:[<`Large|`Small>`Large]->?goal_penalty:bool->tvalcombine:(t*int)list->t(** Combine a list of pairs [w, coeff] where [w] is a weight function,
and [coeff] a strictly positive number. This is a weighted sum
of weights. *)endmodulePriorityFun:sigtypet=C.t->intvalof_string:string->t(** parse string description of weight function and return it *)endtypet(** A priority queue. *)valadd:t->C.t->bool(** Add a clause to the Queue; returns true if clause was actually added *)valadd_seq:t->C.tIter.t->unit(** Add clauses to the queue *)vallength:t->int(** Number of elements *)valis_empty:t->bool(** check whether the queue is empty *)valtake_first:t->C.t(** Take first element of the queue, or raise Not_found *)valname:t->string(** Name of the implementation/role of the queue *)(** {5 Available Queues} *)(* val make : ratio:int -> weight:(C.t -> int) -> string -> t
(** Bring your own implementation of queue.
@param ratio pick-given ratio. One in [ratio] calls to {!take_first},
the returned clause comes from a FIFO; the other times it comes
from a priority queue that uses [weight] to sort clauses
@param name the name of this clause queue *) *)valbfs:unit->t(** FIFO *)valalmost_bfs:unit->t(** Half FIFO, half default *)valexplore:unit->t(** Use heuristics for selecting "small" clauses *)valground:unit->t(** Favor positive unit clauses and ground clauses *)valgoal_oriented:unit->t(** custom weight function that favors clauses that are "close" to
initial conjectures. It is fair. *)valdefault:unit->t(** Obtain the default queue *)valof_profile:profile->t(** Select the queue corresponding to the given profile *)valall_clauses:t->C.tIter.t(** All clauses stored in the queue, in no particular order *)valmem_cl:t->C.t->bool(** is the clause present in the passive set? *)valremove:t->C.t->bool(** ignore the clause in the queue, and make sure it is never
returned with the call to take_first();
returns true if clause was actually removed *)(** {5 IO} *)valpp:tCCFormat.printervalto_string:t->stringend