I am using Z3_solver for nonlinear real arithmetics. I also want to set a timeout for the solver. I am using the following code but it looks like that the timeout does not work since the solver runs forever. Can anyone help me in finding out the problem?
Z3_solver solver;
cfg = Z3_mk_config();
ctx = Z3_mk_context(cfg);
Z3_symbol logic_symbol = Z3_mk_string_symbol(ctx, "QF_UFNRA");
solver = Z3_mk_solver_for_logic((Z3_context)ctx, logic_symbol);
Z3_solver_inc_ref(ctx, solver);
Z3_params params = Z3_mk_params(ctx);
Z3_params_inc_ref(ctx, params);
Z3_symbol r = Z3_mk_string_symbol(ctx, ":timeout");
Z3_params_set_uint(ctx, params, r, 10);
Z3_solver_set_params(ctx, solver, params);
Z3_params_dec_ref(ctx, params);
Z3_del_config(cfg);
....
Z3_solver_assert(ctx,solver,pred);
Z3_lbool b = Z3_solver_check(ctx, solver);