I am using Z3's Python bindings and am curious wether partial mode would speed up my model. However there doesn't seem to be a way to do this in Python. (set_param(...)
doesn"t seem to have a parameter for it)
I considered migrating to pySMT since it claims to support partial mode for Z3, but I would prefer to keep Z3Py.
Bonus question: Would partial mode actually do me any good? I am simulating computer memory in Arrays and want Z3 to ignore entries that are never referenced.
This is how you can set partial models:
This prints:
Regarding your bonus question: I doubt partial models will buy you anything. SMT solvers typically find a model in case of
sat
and then complete the model as necessary. The "finding the model" part is typically the costly action, not completing the model. But it of course depends on your particular problem; so it wouldn't hurt to try.