Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Z3Py With Python 3.3
    primarykey
    data
    text
    <h2>My Situation</h2> <p>I've installed Microsoft Z3 (<code>Z3 [version 4.3.0 - 64 bit]. (C) 2006</code>) and it's <code>pyc</code> binaries for Python2.</p> <p>I've written an Python3 package which needs access to <code>z3</code> functionality.</p> <p>In order to be able to use the <code>pyc</code> binaries with my Python3 package, I <code>decompyle</code> the <code>z3</code> binaries and applied <code>2to3</code>.</p> <h2>My Problem</h2> <p><code>Int('string')</code> doesn't work because Z3Py isn't able to handle the new <code>&lt;class 'str'&gt;</code> used as <code>'string'</code> argument:</p> <pre><code>&gt;&gt;&gt; import z3; z3.Int('abc') Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; File ".\bin\z3.py", line 2931, in Int return ArithRef(Z3_mk_const(ctx.ref(), to_symbol(name, ctx), IntSort(ctx).ast), ctx) File ".\bin\z3.py", line 72, in to_symbol return Z3_mk_string_symbol(_get_ctx(ctx).ref(), s) File ".\bin\z3core.py", line 1430, in Z3_mk_string_symbol r = lib().Z3_mk_string_symbol(a0, a1) ctypes.ArgumentError: argument 2: &lt;class 'TypeError'&gt;: wrong type </code></pre> <h2>My Questions</h2> <ul> <li>It's a little bit hacky to need to <code>decompyle</code> Z3's <code>*.pyc</code> files first. So, are there any Z3Py source codes available?</li> <li>Is there already an existing Z3Py port to Python3?</li> <li>Any other idea how to get <strong>Z3Py to run with Python3</strong>?</li> </ul> <p>Thanks. - If anything's unclear, please leave a question comment.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload