jix / varisat

SAT solver written in Rust

Home Page:https://jix.one/project/varisat

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve CNF generation ergonomics

jix opened this issue · comments

Generating CNF formulas when modeling problems should be improved by:

  • Adding .pos() and .neg() and .lit(polarity: bool) to Var
  • Adding a .new_var() to CnfFormula and to Solver that return the next unused variable (and mark it as used).
  • Also add .new_lit(), .new_vars(len: usize) and .new_lits(len: usize) to CnfFormula and to Solver.

This needs to be added to the manual and the examples should also be updated where it makes them simpler.