(self, func_name)
Create a Z3 Function Declaration for the given function.
Create a Z3 Function Declaration for the given function.
Create a Z3 Function Declaration for the given function .
def _z3_func_decl(self, func_name):
        """Create a Z3 Function Declaration for the given function."""
        try:
            return self._z3_func_decl_cache[func_name]
        except KeyError:
            tp = func_name.symbol_type()
            arity = len(tp.param_types)
            z3dom = (z3.Sort * arity)()
            for i, t in enumerate(tp.param_types):
                z3dom[i] = self._type_to_z3(t).ast
            z3ret = self._type_to_z3(tp.return_type).ast
            z3name = z3.Z3_mk_string_symbol(self.ctx.ref(),
                                            func_name.symbol_name())
            z3func = z3.Z3_mk_func_decl(self.ctx.ref(), z3name,
                                        arity, z3dom, z3ret)
            self._z3_func_decl_cache[func_name] = z3func
            return z3func
def _z3_func_decl ( self , func_name ) : try : return self . _z3_func_decl_cache [ func_name ] except KeyError : tp = func_name . symbol_type ( ) arity = len ( tp . param_types ) z3dom = ( z3 . Sort * arity ) ( ) for i , t in enumerate ( tp . param_types ) : z3dom [ i ] = self . _type_to_z3 ( t ) . ast z3ret = self . _type_to_z3 ( tp . return_type ) . ast z3name = z3 . Z3_mk_string_symbol ( self . ctx . ref ( ) , func_name . symbol_name ( ) ) z3func = z3 . Z3_mk_func_decl ( self . ctx . ref ( ) , z3name , arity , z3dom , z3ret ) self . _z3_func_decl_cache [ func_name ] = z3func return z3func