I generate my problems from a template and due to the nature of the problems, I have to rely on quantifiers. Now, the solver can only find instances for really simple (satisfiable) problems. Finding 'unsat' works in many cases. Finding 'sat' rarely works.
The problem is that even simple things like a definition of two disjoint sets have to be expressed with some really nasty formulas:
(assert (! (disjoint_1 B A) :named a2 ))
(assert (! ; axiom for "disjoint_1"
(forall ((A Rel1)(B Rel1)) (=
(disjoint_1 A B)
(forall ((a0 Atom)) (not (and (in_1 a0 A) (in_1 a0 B))))))
:named ax8))
In order to find an instance, Z3 must find an interpretation of the function in_1
. All other functions all depend on it.
So far, I have heard the following statements related to my problem:
- Every quantifier should have a pattern
- Instance finding does not work if there are any infinite models
I could not find any useful information on the web or in the literature on how to achieve or avoid this. So my question remains:
How can I efficiently find instances to satisfiable formulas (with Z3)? How do I achieve this using patterns (if at all)?