from z3 import *
x = Real('x')
y = Real('y')
a = Real('a')
b = Real('b')
r = Real('r')
s = Solver()
s.set("timeout",600)
f1 = And(0 > 0 + 1*x*x*a*a + 1*y*y*b*b + -1*a*a*b*b,\
0 + 1*x*x + 1*y*y + -20*x + -20*y + -1*r*r + 200 < 0)
s.add(f1)
s.check()
f_name = "some_constraints.smt"
with open(f_name, 'r') as file:
smt_content = file.read()
m2 = z3.parse_smt2_string(smt_content)[0]
s.set("timeout",600)
s.add(Not(m2))
s.set("timeout",600)
print(s.check())
In the program if I comment out the first s.check() call the program behaves as expected. That is, it terminates with the output as unknown, whereas the program in its current form doesn't terminate for some reason.
The contents of some_constraints.smt file are as follows:
I have the following python program:
In the program if I comment out the first
s.check()
call the program behaves as expected. That is, it terminates with the output asunknown
, whereas the program in its current form doesn't terminate for some reason.The contents of
some_constraints.smt
file are as follows: