- Weight : ClauseSelectionStrategy
- Age : ClauseSelectionStrategy
- Generation : ClauseSelectionStrategy
Instances For
StrategyHeap
models GivenClause Selection. StrategyHeap
contains 3 internal heaps: a weight heap, a
generation heap, and an age heap.
- The weight heap is used to select the "smallest" clause (with ties chosen arbitrarily). Here, "smallest" does
not exactly refer to KBO size but instaed refers to size with penalties given by various clause selection heuristics.
The "weight" of each clause, as used by this heap, is calculated in
Clause.selectionPrecedence
in Clause.lean. - The generation heap is used to select the clause that has been generated with the fewest inferences (with older clauses being preferred over younger as a tiebreaker).
- The age heap is used to select the oldest clause.
Only the age heap is required for fairness, but empirically, it is best to usually select the smallest clause,
and we've also found the generation heap helpful for making sure that Duper considers large facts that can't
be clausified all at once (for instance, if a clause has a lit p ↔ q
, then two clauses will be generated via
clausification and if p
and q
are large, it can take a very long time for the second one to be selected).
- set : Std.HashSet α
- status : β
- strategy : β → ClauseSelectionStrategy × β
Instances For
instance
Duper.instInhabitedStrategyHeap
{a✝ : Type u_1}
{a✝¹ : Type}
[Inhabited a✝¹]
{a✝² : BEq a✝}
{a✝³ : Hashable a✝}
:
Inhabited (StrategyHeap a✝)
@[inline]
def
Duper.StrategyHeap.insert
{α : Type u_1}
{β : Type}
[BEq α]
[Hashable α]
(sh : StrategyHeap α)
(x : α)
(weight generation age : Nat)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Duper.StrategyHeap.erase
{α : Type u_1}
{β : Type}
[BEq α]
[Hashable α]
(sh : StrategyHeap α)
(x : α)
:
Equations
Instances For
@[inline]
def
Duper.StrategyHeap.pop?
{α : Type u_1}
{β : Type}
[BEq α]
[Hashable α]
(sh : StrategyHeap α)
:
Option (α × StrategyHeap α)
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
A strategy heap that uses a fairnessCounter for its status
Equations
Instances For
@[reducible, inline]
Equations
- One or more equations did not get rendered due to their size.