from z3 import *
import random
a = Int('a')
b = Int('b')
s = Tactic('qflra').solver()
s.add(a > 10)
set_option('smt.arith.random_initial_value', True)
set_option('smt.random_seed', random.randint(0, 2 ** 8))
while s.check() == sat:
m = s.model()
print m[a]
s.add(a != m[a])
set_option('smt.random_seed', random.randint(0, 2 ** 8))
The result seems to be only randomed for a second... Then it just started to give consecutive numbers.
4294966399
4294966398
4294966397
4294966396
4294966395
4294966394
4294966393
11
12
13
14
4294966400
15
16
17
18
19
How can I make it more random? At least, not a list of consecutive numbers. My optimal goal is to have a list of solutions that are rather uniformly distributed in the solution space.