Exemple #1
0
        internal NativeFuncInterp(NativeContext ctx, NativeModel mdl, Z3_func_decl decl, Z3_func_interp fi)
        {
            Debug.Assert(ctx != null);
            Z3_context nCtx = ctx.nCtx;

            Native.Z3_func_interp_inc_ref(nCtx, fi);

            Declaration = decl;
            Else        = Native.Z3_func_interp_get_else(nCtx, fi);
            uint numEntries = Native.Z3_func_interp_get_num_entries(nCtx, fi);
            uint numArgs    = Native.Z3_func_interp_get_arity(nCtx, fi);

            Entries = new Entry[numEntries];

            for (uint j = 0; j < numEntries; ++j)
            {
                var entry = Native.Z3_func_interp_get_entry(nCtx, fi, j);
                Native.Z3_func_entry_inc_ref(nCtx, entry);
                Entries[j].Arguments = new Z3_ast[numArgs];
                for (uint i = 0; i < numArgs; ++i)
                {
                    Entries[j].Arguments[i] = Native.Z3_func_entry_get_arg(nCtx, entry, i);
                }
                Entries[j].Result = Native.Z3_func_entry_get_value(nCtx, entry);
                Native.Z3_func_entry_dec_ref(nCtx, entry);
            }

            Native.Z3_func_interp_dec_ref(nCtx, fi);
        }
Exemple #2
0
        internal static Entry[] NativeEntries(Z3_context ctx, Z3_stats stats)
        {
            uint n = Native.Z3_stats_size(ctx, stats);

            Entry[] res = new Entry[n];
            for (uint i = 0; i < n; i++)
            {
                Entry  e;
                string k = Native.Z3_stats_get_key(ctx, stats, i);
                if (Native.Z3_stats_is_uint(ctx, stats, i) != 0)
                {
                    e = new Entry(k, Native.Z3_stats_get_uint_value(ctx, stats, i));
                }
                else if (Native.Z3_stats_is_double(ctx, stats, i) != 0)
                {
                    e = new Entry(k, Native.Z3_stats_get_double_value(ctx, stats, i));
                }
                else
                {
                    throw new Z3Exception("Unknown data entry value");
                }
                res[i] = e;
            }
            return(res);
        }
Exemple #3
0
        static voidp _fresh(voidp _ctx, Z3_context new_context)
        {
            var prop  = (UserPropagator)GCHandle.FromIntPtr(_ctx).Target;
            var ctx   = new Context(new_context);
            var prop1 = prop.Fresh(prop.ctx);

            return(GCHandle.ToIntPtr(prop1.gch));
        }
Exemple #4
0
 public extern static void Z3_interrupt(Z3_context a0);
Exemple #5
0
 public extern static void Z3_fixedpoint_assert(Z3_context a0, Z3_fixedpoint a1, Z3_ast a2);
Exemple #6
0
 public extern static void Z3_fixedpoint_add_rule(Z3_context a0, Z3_fixedpoint a1, Z3_ast a2, IntPtr a3);
Exemple #7
0
 public extern static Z3_fixedpoint Z3_mk_fixedpoint(Z3_context a0);
Exemple #8
0
 public extern static IntPtr Z3_get_error_msg_ex(Z3_context a0, uint a1);
Exemple #9
0
 public extern static uint Z3_get_error_code(Z3_context a0);
Exemple #10
0
 public extern static Z3_sort Z3_get_smtlib_sort(Z3_context a0, uint a1);
Exemple #11
0
 public extern static IntPtr Z3_benchmark_to_smtlib_string(Z3_context a0, string a1, string a2, string a3, string a4, uint a5, [In] Z3_ast[] a6, Z3_ast a7);
Exemple #12
0
 public extern static IntPtr Z3_model_to_string(Z3_context a0, Z3_model a1);
Exemple #13
0
 public extern static IntPtr Z3_func_decl_to_string(Z3_context a0, Z3_func_decl a1);
Exemple #14
0
 public extern static IntPtr Z3_sort_to_string(Z3_context a0, Z3_sort a1);
Exemple #15
0
 public extern static IntPtr Z3_pattern_to_string(Z3_context a0, Z3_pattern a1);
Exemple #16
0
 public extern static void Z3_set_ast_print_mode(Z3_context a0, uint a1);
Exemple #17
0
 public extern static Z3_func_decl Z3_get_smtlib_decl(Z3_context a0, uint a1);
Exemple #18
0
 public extern static uint Z3_get_smtlib_num_sorts(Z3_context a0);
Exemple #19
0
 public extern static Z3_ast Z3_parse_smtlib2_string(Z3_context a0, string a1, uint a2, [In] IntPtr[] a3, [In] Z3_sort[] a4, uint a5, [In] IntPtr[] a6, [In] Z3_func_decl[] a7);
Exemple #20
0
 public extern static IntPtr Z3_get_smtlib_error(Z3_context a0);
Exemple #21
0
 public extern static Z3_params Z3_mk_params(Z3_context a0);
Exemple #22
0
 public extern static void Z3_set_error(Z3_context a0, uint a1);
Exemple #23
0
 public extern static void Z3_parse_smtlib_file(Z3_context a0, string a1, uint a2, [In] IntPtr[] a3, [In] Z3_sort[] a4, uint a5, [In] IntPtr[] a6, [In] Z3_func_decl[] a7);
Exemple #24
0
 public extern static void Z3_params_dec_ref(Z3_context a0, Z3_params a1);
Exemple #25
0
 public extern static uint Z3_get_smtlib_num_formulas(Z3_context a0);
Exemple #26
0
 public extern static void Z3_fixedpoint_dec_ref(Z3_context a0, Z3_fixedpoint a1);
Exemple #27
0
 public extern static Z3_ast Z3_get_smtlib_formula(Z3_context a0, uint a1);
Exemple #28
0
 public extern static void Z3_fixedpoint_add_fact(Z3_context a0, Z3_fixedpoint a1, Z3_func_decl a2, uint a3, [In] uint[] a4);
Exemple #29
0
 public extern static uint Z3_func_entry_get_num_args(Z3_context a0, Z3_func_entry a1);
Exemple #30
0
 public extern static uint Z3_get_smtlib_num_assumptions(Z3_context a0);
Exemple #31
0
 public extern static Z3_ast Z3_func_entry_get_arg(Z3_context a0, Z3_func_entry a1, uint a2);
Exemple #32
0
 public extern static Z3_ast Z3_get_smtlib_assumption(Z3_context a0, uint a1);
Exemple #33
0
 public extern static Z3_ast Z3_func_entry_get_value(Z3_context a0, Z3_func_entry a1);