123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106(* 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(** {1 A priority queue of clauses, purely functional} *)moduletypeS=sigmoduleC:Clause_intf.S(** {6 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. *)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 *)valcombine:(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. *)endtypet(** A priority queue. *)valadd:t->C.t->unit(** Add a clause to the Queue *)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 *)(** {6 Available Queues} *)valmake: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 *)(** {6 IO} *)valpp:tCCFormat.printervalto_string:t->stringend