z3py在`Int(';x';上引发异常`

z3py在`Int(';x';上引发异常`,z3,z3py,angr,Z3,Z3py,Angr,在python中,在导入z3之后,我做了x=Int('x')。这给了我回溯 In [16]: x = Int('x') --------------------------------------------------------------------------- ArgumentError Traceback (most recent call last) <ipython-input-16-adbc8f7df7ed>

在python中,在导入z3之后,我做了
x=Int('x')
。这给了我回溯

In [16]: x = Int('x')
---------------------------------------------------------------------------
ArgumentError                             Traceback (most recent call last)
<ipython-input-16-adbc8f7df7ed> in <module>()
----> 1 x = Int('x')

/home/elliot/.local/lib/python2.7/site-packages/z3.pyc in Int(name, ctx)
   2754     """
   2755     ctx = _get_ctx(ctx)
-> 2756     return ArithRef(Z3_mk_const(ctx.ref(), to_symbol(name, ctx), IntSort(ctx).ast), ctx)
   2757 
   2758 def Ints(names, ctx=None):

/home/elliot/.local/lib/python2.7/site-packages/z3.pyc in IntSort(ctx)
   2655     """
   2656     ctx = _get_ctx(ctx)
-> 2657     return ArithSortRef(Z3_mk_int_sort(ctx.ref()), ctx)
   2658 
   2659 def RealSort(ctx=None):

/home/elliot/.local/lib/python2.7/site-packages/z3.pyc in __init__(self, ast, ctx)
    275         self.ast  = ast
    276         self.ctx  = _get_ctx(ctx)
--> 277         Z3_inc_ref(self.ctx.ref(), self.as_ast())
    278 
    279     def __del__(self):

/home/elliot/.local/lib/python2.7/site-packages/z3core.pyc in Z3_inc_ref(a0, a1)
   1252 
   1253 def Z3_inc_ref(a0, a1):
-> 1254   lib().Z3_inc_ref(a0, a1)
   1255   err = lib().Z3_get_error_code(a0)
   1256   if err != Z3_OK:

ArgumentError: argument 2: <type 'exceptions.TypeError'>: unbound method from_param() must be called with Ast instance as first argument (got int instance instead)
[16]中的
x=Int('x')
---------------------------------------------------------------------------
ArgumentError回溯(上次最近的调用)
在()
---->1 x=Int('x')
/Int格式的home/elliot/.local/lib/python2.7/site-packages/z3.pyc(名称,ctx)
2754     """
2755 ctx=_get_ctx(ctx)
->2756返回ArithRef(Z3_mk_const(ctx.ref(),to_symbol(name,ctx),IntSort(ctx.ast),ctx)
2757
2758 def Ints(名称,ctx=无):
/IntSort(ctx)中的home/elliot/.local/lib/python2.7/site-packages/z3.pyc
2655     """
2656 ctx=_get_ctx(ctx)
->2657返回ArithSortRef(Z3_mk_int_sort(ctx.ref()),ctx)
2658
2659 def RealSort(ctx=None):
/home/elliot/.local/lib/python2.7/site-packages/z3.pyc in_uuuuuinit_uuu(self、ast、ctx)
275 self.ast=ast
276 self.ctx=\u get\u ctx(ctx)
-->277 Z3_inc_ref(self.ctx.ref(),self.as_ast())
278
279定义(自我):
/Z3_inc_ref(a0,a1)中的home/elliot/.local/lib/python2.7/site-packages/z3core.pyc
1252
1253 def Z3_inc_ref(a0,a1):
->1254 lib().Z3_inc_ref(a0,a1)
1255 err=lib().Z3获取错误代码(a0)
1256如果出错!=Z3_OK:
ArgumentError:Argument2::必须使用Ast实例作为第一个参数调用来自_param()的unbound方法(改为使用int实例)

我用
pip安装angr-z3
安装了z3。怎么了?

'x'
未定义为符号??我从未见过这样或类似的错误,很可能是pip包已过时(4.4.2尚未发布,因此不稳定)。你能告诉我你想在哪个系统上运行这个吗?目前,angr-z3软件包坏了,但我无法判断这是否与你的问题有关。你能找到并编译最新的大师,看看那里是否也存在这个问题吗?@ChristophWintersteiger,谢谢!现在它起作用了。你可能想发布一个答案,说angr-z3对于遇到这个问题的其他人来说是坏的;我会接受的。太棒了,谢谢你让我们知道!我以前不知道这个包,但我现在正在与作者联系,以解决这个问题。