Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Z3 work in incremental mode?

Tags:

z3

I am using Z3 on QFBV formulas . I was wondering if Z3 can work incrementally on such formulas like SAT solvers can on boolean clauses. Basically I need a way to implement the following loop:

F = initial QFBV formula
while(F is unsat) {
    F := F Union {some additional QFBV formula based on unsat core}
}

Does Z3 maintain the learned information? Can I use z3 incrementally?

Thanks.

like image 485
mahesh prabhu Avatar asked Feb 02 '12 22:02

mahesh prabhu


Video Answer


1 Answers

Yes, Z3 can do that if you use assumptions. This is discussed here: Soft/Hard constraints in Z3

like image 121
Leonardo de Moura Avatar answered Sep 30 '22 13:09

Leonardo de Moura