Improve CNF generation ergonomics
jix opened this issue · comments
Jannis Harder commented
Generating CNF formulas when modeling problems should be improved by:
- Adding
.pos()
and.neg()
and.lit(polarity: bool)
toVar
- Adding a
.new_var()
toCnfFormula
and toSolver
that return the next unused variable (and mark it as used). - Also add
.new_lit()
,.new_vars(len: usize)
and.new_lits(len: usize)
toCnfFormula
and toSolver
.
This needs to be added to the manual and the examples should also be updated where it makes them simpler.