mirror of
https://github.com/Z3Prover/z3
synced 2025-06-20 21:03:39 +00:00
API: add smt.logic parameter to enable setting the logic through the API
currently only Z3_solver_set_params() is supported logic has to be set before solver first usage or before solver reset
This commit is contained in:
parent
c1aa33339d
commit
d642d5fe4c
2 changed files with 6 additions and 0 deletions
|
@ -153,6 +153,11 @@ extern "C" {
|
||||||
LOG_Z3_solver_set_params(c, s, p);
|
LOG_Z3_solver_set_params(c, s, p);
|
||||||
RESET_ERROR_CODE();
|
RESET_ERROR_CODE();
|
||||||
|
|
||||||
|
symbol logic = to_param_ref(p).get_sym("smt.logic", symbol::null);
|
||||||
|
if (logic != symbol::null) {
|
||||||
|
to_solver(s)->m_logic = logic;
|
||||||
|
}
|
||||||
|
|
||||||
if (to_solver(s)->m_solver) {
|
if (to_solver(s)->m_solver) {
|
||||||
bool old_model = to_solver(s)->m_params.get_bool("model", true);
|
bool old_model = to_solver(s)->m_params.get_bool("model", true);
|
||||||
bool new_model = to_param_ref(p).get_bool("model", true);
|
bool new_model = to_param_ref(p).get_bool("model", true);
|
||||||
|
|
|
@ -3,6 +3,7 @@ def_module_params(module_name='smt',
|
||||||
description='smt solver based on lazy smt',
|
description='smt solver based on lazy smt',
|
||||||
export=True,
|
export=True,
|
||||||
params=(('auto_config', BOOL, True, 'automatically configure solver'),
|
params=(('auto_config', BOOL, True, 'automatically configure solver'),
|
||||||
|
('logic', SYMBOL, '', 'logic used to setup the SMT solver'),
|
||||||
('random_seed', UINT, 0, 'random seed for the smt solver'),
|
('random_seed', UINT, 0, 'random seed for the smt solver'),
|
||||||
('relevancy', UINT, 2, 'relevancy propagation heuristic: 0 - disabled, 1 - relevancy is tracked by only affects quantifier instantiation, 2 - relevancy is tracked, and an atom is only asserted if it is relevant'),
|
('relevancy', UINT, 2, 'relevancy propagation heuristic: 0 - disabled, 1 - relevancy is tracked by only affects quantifier instantiation, 2 - relevancy is tracked, and an atom is only asserted if it is relevant'),
|
||||||
('macro_finder', BOOL, False, 'try to find universally quantified formulas that can be viewed as macros'),
|
('macro_finder', BOOL, False, 'try to find universally quantified formulas that can be viewed as macros'),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue