mirror of
https://github.com/Z3Prover/z3
synced 2025-04-24 17:45:32 +00:00
fix #5065 - regression solving str.from_int equations now that it isn't injective any longer
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
4c9fed21e2
commit
0ce1c34d81
29 changed files with 218 additions and 178 deletions
|
@ -25,7 +25,7 @@ Notes:
|
|||
#include "tactic/smtlogics/qfnra_tactic.h"
|
||||
#include "sat/tactic/sat_tactic.h"
|
||||
#include "sat/sat_solver/inc_sat_solver.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
#include "ackermannization/ackermannize_bv_tactic.h"
|
||||
|
||||
#include "tactic/fpa/qffp_tactic.h"
|
||||
|
|
|
@ -19,7 +19,6 @@ Notes:
|
|||
#include "tactic/portfolio/default_tactic.h"
|
||||
#include "tactic/core/simplify_tactic.h"
|
||||
#include "tactic/smtlogics/qfbv_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/smtlogics/qflia_tactic.h"
|
||||
#include "tactic/smtlogics/qflra_tactic.h"
|
||||
#include "tactic/smtlogics/qfnia_tactic.h"
|
||||
|
@ -32,6 +31,7 @@ Notes:
|
|||
#include "tactic/smtlogics/qfaufbv_tactic.h"
|
||||
#include "tactic/smtlogics/qfauflia_tactic.h"
|
||||
#include "tactic/fd_solver/fd_solver.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
|
||||
tactic * mk_default_tactic(ast_manager & m, params_ref const & p) {
|
||||
tactic * st = using_params(and_then(mk_simplify_tactic(m),
|
||||
|
|
|
@ -13,7 +13,7 @@ z3_add_component(smtlogic_tactics
|
|||
qfufbv_tactic.cpp
|
||||
qfuf_tactic.cpp
|
||||
quant_tactics.cpp
|
||||
smt_tactic_select.cpp
|
||||
smt_tactic.cpp
|
||||
COMPONENT_DEPENDENCIES
|
||||
ackermannization
|
||||
aig_tactic
|
||||
|
@ -28,6 +28,7 @@ z3_add_component(smtlogic_tactics
|
|||
PYG_FILES
|
||||
qfufbv_tactic_params.pyg
|
||||
TACTIC_HEADERS
|
||||
smt_tactic.h
|
||||
nra_tactic.h
|
||||
qfaufbv_tactic.h
|
||||
qfauflia_tactic.h
|
||||
|
|
|
@ -21,7 +21,7 @@ Notes:
|
|||
#include "tactic/core/propagate_values_tactic.h"
|
||||
#include "tactic/core/nnf_tactic.h"
|
||||
#include "tactic/arith/probe_arith.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
#include "qe/qe_tactic.h"
|
||||
#include "qe/nlqsat.h"
|
||||
#include "qe/qe_lite.h"
|
||||
|
|
|
@ -25,9 +25,8 @@ Notes:
|
|||
#include "tactic/bv/bv_size_reduction_tactic.h"
|
||||
#include "tactic/core/ctx_simplify_tactic.h"
|
||||
#include "tactic/smtlogics/qfbv_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic_select.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
#include "ackermannization/ackermannize_bv_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
|
||||
static tactic * mk_qfaufbv_preamble(ast_manager & m, params_ref const & p) {
|
||||
|
||||
|
@ -60,7 +59,7 @@ tactic * mk_qfaufbv_tactic(ast_manager & m, params_ref const & p) {
|
|||
|
||||
tactic * st = using_params(
|
||||
and_then(preamble_st,
|
||||
cond(mk_is_qfbv_probe(), mk_qfbv_tactic(m), mk_smt_tactic_select(m, p))), main_p);
|
||||
cond(mk_is_qfbv_probe(), mk_qfbv_tactic(m), mk_smt_tactic(m, p))), main_p);
|
||||
|
||||
st->updt_params(p);
|
||||
return st;
|
||||
|
|
|
@ -22,7 +22,8 @@ Notes:
|
|||
#include "tactic/arith/propagate_ineqs_tactic.h"
|
||||
#include "tactic/core/solve_eqs_tactic.h"
|
||||
#include "tactic/core/elim_uncnstr_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
|
||||
|
||||
tactic * mk_qfauflia_tactic(ast_manager & m, params_ref const & p) {
|
||||
params_ref main_p;
|
||||
|
|
|
@ -26,11 +26,10 @@ Notes:
|
|||
#include "tactic/bv/max_bv_sharing_tactic.h"
|
||||
#include "tactic/bv/bv_size_reduction_tactic.h"
|
||||
#include "tactic/aig/aig_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "sat/tactic/sat_tactic.h"
|
||||
#include "sat/sat_solver/inc_sat_solver.h"
|
||||
#include "ackermannization/ackermannize_bv_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic_select.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
|
||||
#define MEMLIMIT 300
|
||||
|
||||
|
@ -123,8 +122,8 @@ static tactic * mk_qfbv_tactic(ast_manager& m, params_ref const & p, tactic* sat
|
|||
|
||||
tactic * mk_qfbv_tactic(ast_manager & m, params_ref const & p) {
|
||||
tactic * new_sat = cond(mk_produce_proofs_probe(),
|
||||
and_then(mk_simplify_tactic(m), mk_smt_tactic_select(m, p)),
|
||||
and_then(mk_simplify_tactic(m), mk_smt_tactic(m, p)),
|
||||
mk_psat_tactic(m, p));
|
||||
return mk_qfbv_tactic(m, p, new_sat, mk_smt_tactic_select(m, p));
|
||||
return mk_qfbv_tactic(m, p, new_sat, mk_smt_tactic(m, p));
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ Notes:
|
|||
#include "tactic/core/elim_uncnstr_tactic.h"
|
||||
#include "tactic/arith/normalize_bounds_tactic.h"
|
||||
#include "tactic/arith/fix_dl_var_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
#include "tactic/arith/lia2pb_tactic.h"
|
||||
#include "tactic/arith/pb2bv_tactic.h"
|
||||
#include "tactic/arith/diff_neq_tactic.h"
|
||||
|
|
|
@ -23,7 +23,6 @@ Notes:
|
|||
#include "tactic/arith/normalize_bounds_tactic.h"
|
||||
#include "tactic/core/solve_eqs_tactic.h"
|
||||
#include "tactic/core/elim_uncnstr_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/arith/add_bounds_tactic.h"
|
||||
#include "tactic/arith/pb2bv_tactic.h"
|
||||
#include "tactic/arith/lia2pb_tactic.h"
|
||||
|
@ -31,6 +30,7 @@ Notes:
|
|||
#include "tactic/bv/bit_blaster_tactic.h"
|
||||
#include "tactic/bv/max_bv_sharing_tactic.h"
|
||||
#include "tactic/aig/aig_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
#include "sat/tactic/sat_tactic.h"
|
||||
#include "tactic/arith/bound_manager.h"
|
||||
#include "tactic/arith/probe_arith.h"
|
||||
|
|
|
@ -21,10 +21,10 @@ Notes:
|
|||
#include "tactic/core/propagate_values_tactic.h"
|
||||
#include "tactic/core/solve_eqs_tactic.h"
|
||||
#include "tactic/core/elim_uncnstr_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/arith/recover_01_tactic.h"
|
||||
#include "tactic/core/ctx_simplify_tactic.h"
|
||||
#include "tactic/arith/probe_arith.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
|
||||
tactic * mk_qflra_tactic(ast_manager & m, params_ref const & p) {
|
||||
params_ref pivot_p;
|
||||
|
|
|
@ -21,7 +21,6 @@ Notes:
|
|||
#include "tactic/core/propagate_values_tactic.h"
|
||||
#include "tactic/core/solve_eqs_tactic.h"
|
||||
#include "tactic/core/elim_uncnstr_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/bv/bit_blaster_tactic.h"
|
||||
#include "tactic/bv/max_bv_sharing_tactic.h"
|
||||
#include "sat/tactic/sat_tactic.h"
|
||||
|
@ -30,6 +29,7 @@ Notes:
|
|||
#include "tactic/arith/card2bv_tactic.h"
|
||||
#include "tactic/core/ctx_simplify_tactic.h"
|
||||
#include "tactic/core/cofactor_term_ite_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
#include "nlsat/tactic/qfnra_nlsat_tactic.h"
|
||||
|
||||
static tactic * mk_qfnia_bv_solver(ast_manager & m, params_ref const & p_ref) {
|
||||
|
|
|
@ -20,8 +20,8 @@ Notes:
|
|||
#include "tactic/core/simplify_tactic.h"
|
||||
#include "tactic/core/propagate_values_tactic.h"
|
||||
#include "tactic/arith/nla2bv_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "nlsat/tactic/qfnra_nlsat_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
|
||||
static tactic * mk_qfnra_sat_solver(ast_manager& m, params_ref const& p, unsigned bv_size) {
|
||||
params_ref nra2sat_p = p;
|
||||
|
|
|
@ -22,8 +22,7 @@ Notes:
|
|||
#include "tactic/core/symmetry_reduce_tactic.h"
|
||||
#include "tactic/core/solve_eqs_tactic.h"
|
||||
#include "tactic/core/propagate_values_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic_select.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
|
||||
tactic * mk_qfuf_tactic(ast_manager & m, params_ref const & p) {
|
||||
params_ref s2_p;
|
||||
|
@ -35,7 +34,7 @@ tactic * mk_qfuf_tactic(ast_manager & m, params_ref const & p) {
|
|||
mk_solve_eqs_tactic(m, p),
|
||||
using_params(mk_simplify_tactic(m, p), s2_p),
|
||||
if_no_proofs(if_no_unsat_cores(mk_symmetry_reduce_tactic(m, p))),
|
||||
mk_smt_tactic_select(m, p));
|
||||
mk_smt_tactic(m, p));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ Notes:
|
|||
#include "tactic/core/propagate_values_tactic.h"
|
||||
#include "tactic/core/solve_eqs_tactic.h"
|
||||
#include "tactic/core/elim_uncnstr_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/bv/max_bv_sharing_tactic.h"
|
||||
#include "tactic/bv/bv_size_reduction_tactic.h"
|
||||
#include "tactic/core/reduce_args_tactic.h"
|
||||
|
@ -37,7 +36,7 @@ Notes:
|
|||
#include "sat/sat_solver/inc_sat_solver.h"
|
||||
#include "tactic/smtlogics/qfaufbv_tactic.h"
|
||||
#include "tactic/smtlogics/qfbv_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic_select.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
#include "solver/tactic2solver.h"
|
||||
#include "tactic/bv/bv_bound_chk_tactic.h"
|
||||
#include "ackermannization/ackermannize_bv_tactic.h"
|
||||
|
@ -186,7 +185,7 @@ tactic * mk_qfufbv_tactic(ast_manager & m, params_ref const & p) {
|
|||
and_then(preamble_st,
|
||||
cond(mk_is_qfbv_probe(),
|
||||
mk_qfbv_tactic(m),
|
||||
mk_smt_tactic_select(m, p))),
|
||||
mk_smt_tactic(m, p))),
|
||||
main_p);
|
||||
|
||||
st->updt_params(p);
|
||||
|
@ -198,5 +197,5 @@ tactic * mk_qfufbv_ackr_tactic(ast_manager & m, params_ref const & p) {
|
|||
|
||||
tactic * const actual_tactic = alloc(qfufbv_ackr_tactic, m, p);
|
||||
return and_then(preamble_t,
|
||||
cond(mk_is_qfufbv_probe(), actual_tactic, mk_smt_tactic_select(m, p)));
|
||||
cond(mk_is_qfufbv_probe(), actual_tactic, mk_smt_tactic(m, p)));
|
||||
}
|
||||
|
|
|
@ -24,9 +24,9 @@ Revision History:
|
|||
#include "qe/qe_lite.h"
|
||||
#include "qe/qsat.h"
|
||||
#include "tactic/core/ctx_simplify_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/core/elim_term_ite_tactic.h"
|
||||
#include "tactic/arith/probe_arith.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
|
||||
static tactic * mk_quant_preprocessor(ast_manager & m, bool disable_gaussian = false) {
|
||||
params_ref pull_ite_p;
|
||||
|
|
30
src/tactic/smtlogics/smt_tactic.cpp
Normal file
30
src/tactic/smtlogics/smt_tactic.cpp
Normal file
|
@ -0,0 +1,30 @@
|
|||
/*++
|
||||
Copyright (c) 2020 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
smt_tactic.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
Tactic that selects SMT backend.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2020-09-14
|
||||
|
||||
|
||||
--*/
|
||||
#include "smt/tactic/smt_tactic_core.h"
|
||||
#include "sat/tactic/sat_tactic.h"
|
||||
#include "sat/sat_params.hpp"
|
||||
|
||||
tactic * mk_smt_tactic(ast_manager & m, params_ref const & p) {
|
||||
sat_params sp(p);
|
||||
return sp.euf() ? mk_sat_tactic(m, p) : mk_smt_tactic_core(m, p);
|
||||
}
|
||||
|
||||
tactic * mk_smt_tactic_using(ast_manager& m, bool auto_config, params_ref const& p) {
|
||||
sat_params sp(p);
|
||||
return sp.euf() ? mk_sat_tactic(m, p) : mk_smt_tactic_core_using(m, auto_config, p);
|
||||
}
|
32
src/tactic/smtlogics/smt_tactic.h
Normal file
32
src/tactic/smtlogics/smt_tactic.h
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*++
|
||||
Copyright (c) 2020 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
smt_tactic.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Tactic that selects SMT backend.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2020-09-14
|
||||
|
||||
|
||||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "util/params.h"
|
||||
class ast_manager;
|
||||
class tactic;
|
||||
|
||||
tactic * mk_smt_tactic(ast_manager & m, params_ref const & p = params_ref());
|
||||
|
||||
tactic * mk_smt_tactic_using(ast_manager& m, bool auto_config = true, params_ref const& p = params_ref());
|
||||
|
||||
/*
|
||||
ADD_TACTIC("smt", "apply a SAT based SMT solver.", "mk_smt_tactic(m, p)")
|
||||
*/
|
||||
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2020 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
smt_tactic_select.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
Tactic that selects SMT backend.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2020-09-14
|
||||
|
||||
|
||||
--*/
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "sat/tactic/sat_tactic.h"
|
||||
#include "sat/sat_params.hpp"
|
||||
|
||||
tactic * mk_smt_tactic_select(ast_manager & m, params_ref const & p) {
|
||||
sat_params sp(p);
|
||||
return sp.euf() ? mk_sat_tactic(m, p) : mk_smt_tactic(m, p);
|
||||
}
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2020 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
smt_tactic_select.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Tactic that selects SMT backend.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2020-09-14
|
||||
|
||||
|
||||
--*/
|
||||
#pragma once
|
||||
|
||||
#include "util/params.h"
|
||||
class ast_manager;
|
||||
class tactic;
|
||||
|
||||
tactic * mk_smt_tactic_select(ast_manager & m, params_ref const & p);
|
||||
|
|
@ -23,7 +23,7 @@ Notes:
|
|||
#include "tactic/core/distribute_forall_tactic.h"
|
||||
#include "tactic/core/der_tactic.h"
|
||||
#include "tactic/core/reduce_args_tactic.h"
|
||||
#include "smt/tactic/smt_tactic.h"
|
||||
#include "tactic/smtlogics/smt_tactic.h"
|
||||
#include "tactic/core/nnf_tactic.h"
|
||||
#include "tactic/ufbv/macro_finder_tactic.h"
|
||||
#include "tactic/ufbv/ufbv_rewriter_tactic.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue