(Indifferent) Unit and Pure Literals #631
Labels
📁 bdd
Binary Decision Diagrams
✨ feature
New operation or other feature
🎓 student programmer
Work, work...
Milestone
For QBF solving, it is useful to discern a literal is unit or pure since these can immediately be removed with a
bdd_restrict
instead of using the more expensivebdd_exists
orbdd_forall
. This decreases the BDD size considerably, thereby speeding up computation.Unit Literals
For BDDs, we may use the more general concept of an indifferent unit literal (IUL) [working title] which are all of the variables that can be restricted without changing the result with respect to
bdd_exists
:bdd_isunit(f, x, positive)
which returns true if x is an IUL in f. If positive is true, then one checks for x being a positive IUL. Otherwise, one checks for x being a negative one.bdd_isunit(f, x)
where positive is put into the signedness of x.bdd_units(f, c)
which calls the consumer function c with pairs (x, positive) for all IULs in f.bdd_units(f, c)
which calls the consumer function c with x and positive is encoded into its signedness.Pure Literals
Similarly, one can also identify indifferent pure literals (IPL) [working title] that can be restricted away without changing the result of
bdd_forall
:bdd_ispure(f, x, positive)
which returns true if x is an IPL in f. If positive is true, then one checks for x being a positive IUL. Otherwise, one checks for x being a negative one.bdd_ispure(f, x)
where positive is put into the signedness of x.bdd_pures(f, c)
which calls the consumer function c with pairs (x, positive) for all IPLs in f.bdd_pures(f, c)
which calls the consumer function c with x and positive encoded into x's signedness.All of these functions can be implemented as O(N/B) single-scan algorithms. Both functions can terminate after reaching a variable y > x. The predicates can also make use of fail-fast.
All functions should of course be unit tested.
Additional Context
This idea was identified by Louise Bonderup Dohn while working on her Master's thesis.
The text was updated successfully, but these errors were encountered: