3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-08 18:31:49 +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:
Nuno Lopes 2016-02-25 09:47:51 +00:00
parent c1aa33339d
commit d642d5fe4c
2 changed files with 6 additions and 0 deletions

View file

@ -153,6 +153,11 @@ extern "C" {
LOG_Z3_solver_set_params(c, s, p);
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) {
bool old_model = to_solver(s)->m_params.get_bool("model", true);
bool new_model = to_param_ref(p).get_bool("model", true);

View file

@ -3,6 +3,7 @@ def_module_params(module_name='smt',
description='smt solver based on lazy smt',
export=True,
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'),
('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'),