pkgcore.restrictions.boolean module¶
Boolean combinations of restrictions.
This module provides classes that can be used to combine arbitrary collections of restrictions in AND, NAND, OR, NOR, XOR, XNOR style operations.
- class pkgcore.restrictions.boolean.AndRestriction(*a, **kw)[source]¶
Bases:
base
Boolean AND grouping of restrictions. negation is a NAND
- cnf_solutions(full_solution_expansion=False)[source]¶
returns solutions in CNF (conjunctive normalized form) of this instance
- Parameters:
full_solution_expansion – controls whether to expand everything (break apart atoms for example); this isn’t likely what you want
- dnf_solutions(*args, **kwds)[source]¶
list form of
iter_dnf_solutions
, see iter_dnf_solutions for args
- iter_cnf_solutions(full_solution_expansion=False)[source]¶
returns solutions in CNF (conjunctive normalized form) of this instance
- Parameters:
full_solution_expansion – controls whether to expand everything (break apart atoms for example); this isn’t likely what you want
- class pkgcore.restrictions.boolean.OrRestriction(*a, **kw)[source]¶
Bases:
base
Boolean OR grouping of restrictions.
- cnf_solutions(full_solution_expansion=False)[source]¶
Returns a list in CNF (conjunctive normalized form) of this instance.
- Parameters:
full_solution_expansion – controls whether to expand everything (break apart atoms for example); this isn’t likely what you want