3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-11 03:33:35 +00:00

Pull out the solver.

This commit is contained in:
Ben Laurie 2015-04-05 17:57:21 +01:00
parent e8b8393c31
commit 0f467eb599

View file

@ -989,8 +989,9 @@ void sudoku_example() {
x.push_back(c.int_const(x_name.str().c_str()));
}
// each cell contains a value in {1, ..., 9}
solver s(c);
// each cell contains a value in {1, ..., 9}
for (unsigned i = 0; i < 9; ++i)
for (unsigned j = 0; j < 9; ++j) {
s.add(x[i * 9 + j] >= 1 && x[i * 9 + j] <= 9);