mirror of
https://github.com/Z3Prover/z3
synced 2025-04-28 03:15:50 +00:00
Merge branch 'unstable' of https://github.com/Z3Prover/z3 into unstable
This commit is contained in:
commit
2c2a77174c
112 changed files with 782 additions and 22293 deletions
|
@ -1,4 +1,10 @@
|
|||
|
||||
/*++
|
||||
Copyright (c) 2015 Microsoft Corporation
|
||||
|
||||
--*/
|
||||
|
||||
|
||||
|
||||
#include"arith_bounds_tactic.h"
|
||||
#include"arith_decl_plugin.h"
|
||||
|
|
|
@ -485,7 +485,6 @@ public:
|
|||
return;
|
||||
}
|
||||
|
||||
unsigned size = g->size();
|
||||
expr_ref new_f1(m), new_f2(m);
|
||||
proof_ref new_pr1(m), new_pr2(m);
|
||||
for (unsigned idx = 0; !g->inconsistent() && idx < g->size(); idx++) {
|
||||
|
|
|
@ -854,7 +854,7 @@ private:
|
|||
m_temporary_ints(m),
|
||||
m_used_dependencies(m),
|
||||
m_rw(*this) {
|
||||
updt_params(p);
|
||||
updt_params(p);
|
||||
m_b_rw.set_flat(false); // no flattening otherwise will blowup the memory
|
||||
m_b_rw.set_elim_and(true);
|
||||
}
|
||||
|
@ -871,12 +871,17 @@ private:
|
|||
m_max_memory = megabytes_to_bytes(p.get_uint("max_memory", UINT_MAX));
|
||||
m_all_clauses_limit = p.get_uint("pb2bv_all_clauses_limit", 8);
|
||||
m_cardinality_limit = p.get_uint("pb2bv_cardinality_limit", UINT_MAX);
|
||||
m_b_rw.updt_params(p);
|
||||
}
|
||||
|
||||
void collect_param_descrs(param_descrs & r) {
|
||||
insert_max_memory(r);
|
||||
insert_max_memory(r);
|
||||
r.insert("pb2bv_all_clauses_limit", CPK_UINT, "(default: 8) maximum number of literals for using equivalent CNF encoding of PB constraint.");
|
||||
r.insert("pb2bv_cardinality_limit", CPK_UINT, "(default: inf) limit for using arc-consistent cardinality constraint encoding.");
|
||||
|
||||
m_b_rw.get_param_descrs(r);
|
||||
r.erase("flat");
|
||||
r.erase("elim_and");
|
||||
}
|
||||
|
||||
void set_cancel(bool f) {
|
||||
|
|
|
@ -56,7 +56,7 @@ struct quasi_pb_probe : public probe {
|
|||
}
|
||||
};
|
||||
|
||||
probe * mk_quasi_pb_probe() {
|
||||
probe * mk_is_quasi_pb_probe() {
|
||||
return mk_and(mk_not(mk_is_unbounded_probe()),
|
||||
alloc(quasi_pb_probe));
|
||||
}
|
||||
|
@ -100,9 +100,11 @@ static tactic * mk_bv2sat_tactic(ast_manager & m) {
|
|||
#define SMALL_SIZE 80000
|
||||
|
||||
static tactic * mk_pb_tactic(ast_manager & m) {
|
||||
params_ref pb2bv_p;
|
||||
pb2bv_p.set_bool("ite_extra", true);
|
||||
params_ref pb2bv_p;
|
||||
pb2bv_p.set_uint("pb2bv_all_clauses_limit", 8);
|
||||
|
||||
params_ref bv2sat_p;
|
||||
bv2sat_p.set_bool("ite_extra", true);
|
||||
|
||||
return and_then(fail_if_not(mk_is_pb_probe()),
|
||||
fail_if(mk_produce_proofs_probe()),
|
||||
|
@ -113,14 +115,16 @@ static tactic * mk_pb_tactic(ast_manager & m) {
|
|||
mk_fail_if_undecided_tactic()),
|
||||
and_then(using_params(mk_pb2bv_tactic(m), pb2bv_p),
|
||||
fail_if_not(mk_is_qfbv_probe()),
|
||||
mk_bv2sat_tactic(m))));
|
||||
using_params(mk_bv2sat_tactic(m), bv2sat_p))));
|
||||
}
|
||||
|
||||
|
||||
static tactic * mk_lia2sat_tactic(ast_manager & m) {
|
||||
params_ref pb2bv_p;
|
||||
pb2bv_p.set_bool("ite_extra", true);
|
||||
pb2bv_p.set_uint("pb2bv_all_clauses_limit", 8);
|
||||
|
||||
params_ref bv2sat_p;
|
||||
bv2sat_p.set_bool("ite_extra", true);
|
||||
|
||||
return and_then(fail_if(mk_is_unbounded_probe()),
|
||||
fail_if(mk_produce_proofs_probe()),
|
||||
|
@ -130,7 +134,7 @@ static tactic * mk_lia2sat_tactic(ast_manager & m) {
|
|||
mk_lia2pb_tactic(m),
|
||||
using_params(mk_pb2bv_tactic(m), pb2bv_p),
|
||||
fail_if_not(mk_is_qfbv_probe()),
|
||||
mk_bv2sat_tactic(m));
|
||||
using_params(mk_bv2sat_tactic(m), bv2sat_p));
|
||||
}
|
||||
|
||||
// Try to find a model for an unbounded ILP problem.
|
||||
|
@ -208,7 +212,7 @@ tactic * mk_qflia_tactic(ast_manager & m, params_ref const & p) {
|
|||
tactic * st = using_params(and_then(preamble_st,
|
||||
or_else(mk_ilp_model_finder_tactic(m),
|
||||
mk_pb_tactic(m),
|
||||
and_then(fail_if_not(mk_quasi_pb_probe()),
|
||||
and_then(fail_if_not(mk_is_quasi_pb_probe()),
|
||||
using_params(mk_lia2sat_tactic(m), quasi_pb_p),
|
||||
mk_fail_if_undecided_tactic()),
|
||||
mk_bounded_tactic(m),
|
||||
|
|
|
@ -28,4 +28,11 @@ tactic * mk_qflia_tactic(ast_manager & m, params_ref const & p = params_ref());
|
|||
ADD_TACTIC("qflia", "builtin strategy for solving QF_LIA problems.", "mk_qflia_tactic(m, p)")
|
||||
*/
|
||||
|
||||
|
||||
probe * mk_is_quasi_pb_probe();
|
||||
|
||||
/*
|
||||
ADD_PROBE("is-quasi-pb", "true if the goal is quasi-pb.", "mk_is_quasi_pb_probe()")
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue