3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-21 20:02:05 +00:00

Fix Python API examples so they work with Python 3 as well as Python 2.

This commit is contained in:
Dan Liew 2017-06-26 11:29:00 +01:00
parent 849eb389e6
commit 896aae5606
4 changed files with 22 additions and 17 deletions

View file

@ -4,7 +4,7 @@
# adjacent entries fall in the range 0,..,n-1
# This is known as the "The All-Interval Series Problem"
# See http://www.csplib.org/Problems/prob007/
from __future__ import print_function
from z3 import *
import time
@ -56,7 +56,7 @@ def process_model(s, xij, n):
block += [xij[i][j]]
k = j
values += [k]
print values
print(values)
sys.stdout.flush()
return block
@ -68,9 +68,9 @@ def all_models(n):
block = process_model(s, xij, n)
s.add(Not(And(block)))
count += 1
print s.statistics()
print time.clock() - start
print count
print(s.statistics())
print(time.clock() - start)
print(count)
set_option(verbose=1)
all_models(12)