A simple boolean constraint solver.