0

So lets assume I have a large Problem to solve in Z3 and if i try to solve it in one take, it would take too much time. So i divide this problem in parts and solve them individually. As a toy example lets assume that my complex problem is to solve those 3 equations:

eq1: x>5
eq2: y<6
eq3: x+y = 10

So my question is whether for example it would be possible to solve eq1 and eq2 first. And then using the result solve eq3.

assert eq1
assert eq2

(check-sat)

assert eq3
(check-sat)
(get-model)

seems to work but I m not sure whether it makes sense performancewise? Would incremental solving maybe help me out there? Or is there any other feature of z3 that i can use to partition my problem?

Sergey
  • 21
  • 2

1 Answers1

0

The problems considered are usually satisfiability problems, i.e., the goal is to find one solution (model). A solution (model) that satisfies eq1 does not necessarily satisfy eq3, thus you can't just cut the problem in half. We would have to find all solutions (models) for eq1 so that we can replace x in eq3 with that (set of) solutions. (For example, this is what happens in Gaussian elimination after the matrix is diagonal.)

Christoph Wintersteiger
  • 8,234
  • 1
  • 16
  • 30