コード例 #1
0
 /// <summary>
 /// Disposes of the underlying native Z3 object.
 /// </summary>
 public void Dispose()
 {
     if (z3solver != IntPtr.Zero)
     {
         Native.Z3_solver_dec_ref(nCtx, z3solver);
         z3solver = IntPtr.Zero;
     }
     GC.SuppressFinalize(this);
 }
コード例 #2
0
        internal NativeSolver(NativeContext nativeCtx, Z3_solver z3solver)
        {
            Debug.Assert(nativeCtx != null);
            Debug.Assert(z3solver != IntPtr.Zero);

            this.ntvContext = nativeCtx;
            this.z3solver   = z3solver;

            Native.Z3_solver_inc_ref(nCtx, z3solver);
        }
コード例 #3
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public static int Z3_get_implied_equalities(Z3_context a0, Z3_solver a1, uint a2, [In] Z3_ast[] a3, [Out] uint[] a4) {
     int r = LIB.Z3_get_implied_equalities(a0, a1, a2, a3, a4);
     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;
 }
コード例 #4
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public static Z3_stats Z3_solver_get_statistics(Z3_context a0, Z3_solver a1) {
     Z3_stats r = LIB.Z3_solver_get_statistics(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;
 }
コード例 #5
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public static void Z3_solver_assert_and_track(Z3_context a0, Z3_solver a1, Z3_ast a2, Z3_ast a3) {
     LIB.Z3_solver_assert_and_track(a0, a1, a2, a3);
     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)));
 }
コード例 #6
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static int Z3_get_implied_equalities(Z3_context a0, Z3_solver a1, uint a2, [In] Z3_ast[] a3, [Out] uint[] a4);
コード例 #7
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static Z3_stats Z3_solver_get_statistics(Z3_context a0, Z3_solver a1);
コード例 #8
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static Z3_ast_vector Z3_solver_get_unsat_core(Z3_context a0, Z3_solver a1);
コード例 #9
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static void Z3_solver_pop(Z3_context a0, Z3_solver a1, uint a2);
コード例 #10
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static void Z3_solver_push(Z3_context a0, Z3_solver a1);
コード例 #11
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static void Z3_solver_dec_ref(Z3_context a0, Z3_solver a1);
コード例 #12
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static void Z3_solver_set_params(Z3_context a0, Z3_solver a1, Z3_params a2);
コード例 #13
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static Z3_param_descrs Z3_solver_get_param_descrs(Z3_context a0, Z3_solver a1);
コード例 #14
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static IntPtr Z3_solver_get_help(Z3_context a0, Z3_solver a1);
コード例 #15
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static Z3_solver Z3_solver_translate(Z3_context a0, Z3_solver a1, Z3_context a2);
コード例 #16
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static Z3_model Z3_solver_get_model(Z3_context a0, Z3_solver a1);
コード例 #17
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static Z3_ast Z3_solver_get_proof(Z3_context a0, Z3_solver a1);
コード例 #18
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static void Z3_solver_reset(Z3_context a0, Z3_solver a1);
コード例 #19
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static IntPtr Z3_solver_get_reason_unknown(Z3_context a0, Z3_solver a1);
コード例 #20
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static uint Z3_solver_get_num_scopes(Z3_context a0, Z3_solver a1);
コード例 #21
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static IntPtr Z3_solver_to_string(Z3_context a0, Z3_solver a1);
コード例 #22
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static void Z3_solver_assert(Z3_context a0, Z3_solver a1, Z3_ast a2);
コード例 #23
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public static void Z3_solver_reset(Z3_context a0, Z3_solver a1) {
     LIB.Z3_solver_reset(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)));
 }
コード例 #24
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static void Z3_solver_assert_and_track(Z3_context a0, Z3_solver a1, Z3_ast a2, Z3_ast a3);
コード例 #25
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public static int Z3_solver_check_assumptions(Z3_context a0, Z3_solver a1, uint a2, [In] Z3_ast[] a3) {
     int r = LIB.Z3_solver_check_assumptions(a0, a1, a2, a3);
     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;
 }
コード例 #26
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static Z3_ast_vector Z3_solver_get_assertions(Z3_context a0, Z3_solver a1);
コード例 #27
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public static string Z3_solver_to_string(Z3_context a0, Z3_solver a1) {
     IntPtr r = LIB.Z3_solver_to_string(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 Marshal.PtrToStringAnsi(r);
 }
コード例 #28
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static int Z3_solver_check(Z3_context a0, Z3_solver a1);
コード例 #29
0
        /// <summary>
        /// Creates a new (incremental) solver.
        /// </summary>
        public NativeSolver MkSimpleSolver()
        {
            Z3_solver nSolver = Native.Z3_mk_simple_solver(nCtx);

            return(new NativeSolver(this, nSolver));
        }
コード例 #30
0
ファイル: Native.cs プロジェクト: killbug2004/Snippets
 public extern static int Z3_solver_check_assumptions(Z3_context a0, Z3_solver a1, uint a2, [In] Z3_ast[] a3);