/// <summary> /// Get the arguments for app /// </summary> /// <param name="app"></param> /// <returns></returns> public Z3_ast[] GetAppArgs(Z3_app app) { var numArgs = GetNumArgs(app); var args = new Z3_ast[numArgs]; for (uint i = 0; i < numArgs; i++) { args[i] = GetAppArg(app, i); } return(args); }
internal Z3_ast GetAppArg(Z3_app app, uint i) => Native.Z3_get_app_arg(nCtx, app, i);
/// <summary> /// Return number of arguments for app /// </summary> /// <param name="app"></param> /// <returns></returns> public uint GetNumArgs(Z3_app app) { Debug.Assert(app != IntPtr.Zero); return(Native.Z3_get_app_num_args(nCtx, app)); }
public extern static Z3_ast Z3_get_app_arg(Z3_context a0, Z3_app a1, uint a2);
public extern static uint Z3_get_app_num_args(Z3_context a0, Z3_app a1);
public extern static Z3_func_decl Z3_get_app_decl(Z3_context a0, Z3_app a1);
public extern static Z3_ast Z3_app_to_ast(Z3_context a0, Z3_app a1);
public static Z3_ast Z3_get_app_arg(Z3_context a0, Z3_app a1, uint a2) { Z3_ast r = LIB.Z3_get_app_arg(a0, a1, a2); Z3_error_code err = (Z3_error_code)LIB.Z3_get_error_code(a0); if (err != Z3_error_code.Z3_OK) throw new Z3Exception(Marshal.PtrToStringAnsi(LIB.Z3_get_error_msg_ex(a0, (uint)err))); return r; }
public static Z3_func_decl Z3_get_app_decl(Z3_context a0, Z3_app a1) { Z3_func_decl r = LIB.Z3_get_app_decl(a0, a1); Z3_error_code err = (Z3_error_code)LIB.Z3_get_error_code(a0); if (err != Z3_error_code.Z3_OK) throw new Z3Exception(Marshal.PtrToStringAnsi(LIB.Z3_get_error_msg_ex(a0, (uint)err))); return r; }