I am trying to influence the randomness of results for model values generated by Z3. As far as I understand, the options for this are very limited: in the case of linear arithmetic, the simplex solver does not allow random results that still satisfy the given constraints. However, there is the smt.arith.random_initial_value option ("use random initial values in a procedure based on the simplex method for linear arithmetic (default: false)"), which does not seem to work:
from z3 import * set_option('smt.arith.random_initial_value',True) x = Int('x') y = Int('y') s = Solver() s.add( x+y > 0) s.check() s.model()
As a result, it seems that it always turns out [y = 0, x = 1]. Even completion of the model for variables not used in these constraints creates deterministic results all the time.
Any ideas or tips on how this option works?
source share