示例#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
 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
 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
 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
 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
 public extern static Z3_stats Z3_solver_get_statistics(Z3_context a0, Z3_solver a1);
示例#8
0
 public extern static Z3_ast_vector Z3_solver_get_unsat_core(Z3_context a0, Z3_solver a1);
示例#9
0
 public extern static void Z3_solver_pop(Z3_context a0, Z3_solver a1, uint a2);
示例#10
0
 public extern static void Z3_solver_push(Z3_context a0, Z3_solver a1);
示例#11
0
 public extern static void Z3_solver_dec_ref(Z3_context a0, Z3_solver a1);
示例#12
0
 public extern static void Z3_solver_set_params(Z3_context a0, Z3_solver a1, Z3_params a2);
示例#13
0
 public extern static Z3_param_descrs Z3_solver_get_param_descrs(Z3_context a0, Z3_solver a1);
示例#14
0
 public extern static IntPtr Z3_solver_get_help(Z3_context a0, Z3_solver a1);
示例#15
0
 public extern static Z3_solver Z3_solver_translate(Z3_context a0, Z3_solver a1, Z3_context a2);
示例#16
0
 public extern static Z3_model Z3_solver_get_model(Z3_context a0, Z3_solver a1);
示例#17
0
 public extern static Z3_ast Z3_solver_get_proof(Z3_context a0, Z3_solver a1);
示例#18
0
 public extern static void Z3_solver_reset(Z3_context a0, Z3_solver a1);
示例#19
0
 public extern static IntPtr Z3_solver_get_reason_unknown(Z3_context a0, Z3_solver a1);
示例#20
0
 public extern static uint Z3_solver_get_num_scopes(Z3_context a0, Z3_solver a1);
示例#21
0
 public extern static IntPtr Z3_solver_to_string(Z3_context a0, Z3_solver a1);
示例#22
0
 public extern static void Z3_solver_assert(Z3_context a0, Z3_solver a1, Z3_ast a2);
示例#23
0
 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
 public extern static void Z3_solver_assert_and_track(Z3_context a0, Z3_solver a1, Z3_ast a2, Z3_ast a3);
示例#25
0
 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
 public extern static Z3_ast_vector Z3_solver_get_assertions(Z3_context a0, Z3_solver a1);
示例#27
0
 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
 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
 public extern static int Z3_solver_check_assumptions(Z3_context a0, Z3_solver a1, uint a2, [In] Z3_ast[] a3);