mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 02:45:51 +00:00
Merge remote-tracking branch 'upstream/master' into lackr
This commit is contained in:
commit
743a59254e
100 changed files with 8825 additions and 3447 deletions
|
@ -366,7 +366,7 @@ struct purify_arith_proc {
|
|||
push_cnstr(EQ(x, u().mk_power(k, u().mk_numeral(n, false))));
|
||||
push_cnstr_pr(result_pr);
|
||||
}
|
||||
else if (complete()) {
|
||||
else {
|
||||
SASSERT(n.is_even());
|
||||
// (^ x (/ 1 n)) --> k | x >= 0 implies (x = k^n and k >= 0), x < 0 implies k = neg-root(x, n)
|
||||
// when n is even
|
||||
|
@ -379,9 +379,9 @@ struct purify_arith_proc {
|
|||
EQ(k, u().mk_neg_root(x, u().mk_numeral(n, false)))));
|
||||
push_cnstr_pr(result_pr);
|
||||
}
|
||||
else {
|
||||
return BR_FAILED;
|
||||
}
|
||||
// else {
|
||||
// return BR_FAILED;
|
||||
// }
|
||||
}
|
||||
else {
|
||||
// root not supported for integers.
|
||||
|
|
|
@ -1,32 +1,33 @@
|
|||
/*++
|
||||
/*++
|
||||
Copyright (c) 2011 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
|
||||
Module Name:
|
||||
|
||||
bit_blaster_tactic.h
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
Abstract:
|
||||
|
||||
Apply bit-blasting to a given goal.
|
||||
|
||||
Author:
|
||||
|
||||
|
||||
Author:
|
||||
|
||||
Leonardo (leonardo) 2011-10-25
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
|
||||
Notes:
|
||||
|
||||
--*/
|
||||
#ifndef BIT_BLASTER_TACTIC_H_
|
||||
#define BIT_BLASTER_TACTIC_H_
|
||||
|
||||
#include"params.h"
|
||||
#include"bit_blaster_rewriter.h"
|
||||
class ast_manager;
|
||||
class tactic;
|
||||
|
||||
|
||||
#include"params.h"
|
||||
#include"bit_blaster_rewriter.h"
|
||||
class ast_manager;
|
||||
class tactic;
|
||||
|
||||
tactic * mk_bit_blaster_tactic(ast_manager & m, params_ref const & p = params_ref());
|
||||
tactic * mk_bit_blaster_tactic(ast_manager & m, bit_blaster_rewriter* rw, params_ref const & p = params_ref());
|
||||
/*
|
||||
/*
|
||||
ADD_TACTIC("bit-blast", "reduce bit-vector expressions into SAT.", "mk_bit_blaster_tactic(m, p)")
|
||||
*/
|
||||
#endif
|
||||
*/
|
||||
#endif
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Revision History:
|
|||
#include"occurs.h"
|
||||
#include"cooperate.h"
|
||||
#include"goal_shared_occs.h"
|
||||
#include"ast_smt2_pp.h"
|
||||
#include"ast_pp.h"
|
||||
|
||||
class solve_eqs_tactic : public tactic {
|
||||
struct imp {
|
||||
|
@ -92,21 +92,23 @@ class solve_eqs_tactic : public tactic {
|
|||
}
|
||||
|
||||
// Use: (= x def) and (= def x)
|
||||
bool trivial_solve(expr * lhs, expr * rhs, app_ref & var, expr_ref & def, proof_ref & pr) {
|
||||
|
||||
bool trivial_solve1(expr * lhs, expr * rhs, app_ref & var, expr_ref & def, proof_ref & pr) {
|
||||
|
||||
if (is_uninterp_const(lhs) && !m_candidate_vars.is_marked(lhs) && !occurs(lhs, rhs) && check_occs(lhs)) {
|
||||
var = to_app(lhs);
|
||||
def = rhs;
|
||||
pr = 0;
|
||||
return true;
|
||||
}
|
||||
else if (is_uninterp_const(rhs) && !m_candidate_vars.is_marked(rhs) && !occurs(rhs, lhs) && check_occs(rhs)) {
|
||||
var = to_app(rhs);
|
||||
def = lhs;
|
||||
if (m_produce_proofs)
|
||||
pr = m().mk_commutativity(m().mk_eq(lhs, rhs));
|
||||
return true;
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
bool trivial_solve(expr * lhs, expr * rhs, app_ref & var, expr_ref & def, proof_ref & pr) {
|
||||
return
|
||||
trivial_solve1(lhs, rhs, var, def, pr) ||
|
||||
trivial_solve1(rhs, lhs, var, def, pr);
|
||||
}
|
||||
|
||||
// (ite c (= x t1) (= x t2)) --> (= x (ite c t1 t2))
|
||||
|
|
|
@ -132,7 +132,7 @@ expr_ref fpa2bv_model_converter::convert_bv2fp(sort * s, expr * sgn, expr * exp,
|
|||
mpzm.set(sig_z, sig_q.to_mpq().numerator());
|
||||
exp_z = mpzm.get_int64(exp_unbiased_q.to_mpq().numerator());
|
||||
|
||||
fu.fm().set(fp_val, ebits, sbits, !mpqm.is_zero(sgn_q.to_mpq()), sig_z, exp_z);
|
||||
fu.fm().set(fp_val, ebits, sbits, !mpqm.is_zero(sgn_q.to_mpq()), exp_z, sig_z);
|
||||
|
||||
mpzm.del(sig_z);
|
||||
|
||||
|
|
|
@ -102,7 +102,8 @@ tactic * mk_lra_tactic(ast_manager & m, params_ref const & p) {
|
|||
or_else(try_for(mk_smt_tactic(), 100),
|
||||
try_for(qe::mk_sat_tactic(m), 1000),
|
||||
try_for(mk_smt_tactic(), 1000),
|
||||
and_then(mk_qe_tactic(m), mk_smt_tactic())));
|
||||
and_then(mk_qe_tactic(m), mk_smt_tactic())
|
||||
));
|
||||
|
||||
st->updt_params(p);
|
||||
return st;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue