mirror of
https://github.com/Z3Prover/z3
synced 2025-08-02 17:30:23 +00:00
tabs
This commit is contained in:
parent
25f37c8a0c
commit
32fb679066
17 changed files with 141 additions and 142 deletions
|
@ -89,7 +89,7 @@ namespace api {
|
||||||
m_bv_util(m()),
|
m_bv_util(m()),
|
||||||
m_datalog_util(m()),
|
m_datalog_util(m()),
|
||||||
m_fpa_util(m()),
|
m_fpa_util(m()),
|
||||||
m_dtutil(m()),
|
m_dtutil(m()),
|
||||||
m_last_result(m()),
|
m_last_result(m()),
|
||||||
m_ast_trail(m()),
|
m_ast_trail(m()),
|
||||||
m_replay_stack() {
|
m_replay_stack() {
|
||||||
|
|
|
@ -36,11 +36,11 @@
|
||||||
#include"scoped_proof.h"
|
#include"scoped_proof.h"
|
||||||
|
|
||||||
static void show_interpolant_and_maybe_check(cmd_context & ctx,
|
static void show_interpolant_and_maybe_check(cmd_context & ctx,
|
||||||
ptr_vector<ast> &cnsts,
|
ptr_vector<ast> &cnsts,
|
||||||
expr *t,
|
expr *t,
|
||||||
ptr_vector<ast> &interps,
|
ptr_vector<ast> &interps,
|
||||||
params_ref &m_params,
|
params_ref &m_params,
|
||||||
bool check)
|
bool check)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (m_params.get_bool("som", false))
|
if (m_params.get_bool("som", false))
|
||||||
|
|
|
@ -1171,7 +1171,7 @@ namespace Duality {
|
||||||
new_alits.push_back(conj);
|
new_alits.push_back(conj);
|
||||||
#endif
|
#endif
|
||||||
slvr().add(ctx.make(Implies, res, conj));
|
slvr().add(ctx.make(Implies, res, conj));
|
||||||
// std::cout << res << ": " << conj << "\n";
|
// std::cout << res << ": " << conj << "\n";
|
||||||
}
|
}
|
||||||
if (opt_map)
|
if (opt_map)
|
||||||
(*opt_map)[res] = conj;
|
(*opt_map)[res] = conj;
|
||||||
|
@ -3056,7 +3056,7 @@ namespace Duality {
|
||||||
Push();
|
Push();
|
||||||
expr the_impl = is.get_implicant();
|
expr the_impl = is.get_implicant();
|
||||||
if(eq(the_impl,prev_impl)){
|
if(eq(the_impl,prev_impl)){
|
||||||
// std::cout << "got old implicant\n";
|
// std::cout << "got old implicant\n";
|
||||||
repeated_case_count++;
|
repeated_case_count++;
|
||||||
}
|
}
|
||||||
prev_impl = the_impl;
|
prev_impl = the_impl;
|
||||||
|
@ -3379,7 +3379,7 @@ namespace Duality {
|
||||||
int arity = f.arity();
|
int arity = f.arity();
|
||||||
std::vector<sort> domain;
|
std::vector<sort> domain;
|
||||||
for(int i = 0; i < arity; i++)
|
for(int i = 0; i < arity; i++)
|
||||||
domain.push_back(f.domain(i));
|
domain.push_back(f.domain(i));
|
||||||
return ctx.function(name.c_str(), arity, &domain[0], f.range());
|
return ctx.function(name.c_str(), arity, &domain[0], f.range());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3390,7 +3390,7 @@ namespace Duality {
|
||||||
int arity = f.arity();
|
int arity = f.arity();
|
||||||
std::vector<sort> domain;
|
std::vector<sort> domain;
|
||||||
for(int i = 0; i < arity; i++)
|
for(int i = 0; i < arity; i++)
|
||||||
domain.push_back(f.domain(i));
|
domain.push_back(f.domain(i));
|
||||||
return ctx.function(name.c_str(), arity, &domain[0], f.range());
|
return ctx.function(name.c_str(), arity, &domain[0], f.range());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1136,7 +1136,6 @@ namespace Duality {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Node *CreateUnderapproxNode(Node *node){
|
Node *CreateUnderapproxNode(Node *node){
|
||||||
// cex.get_tree()->ComputeUnderapprox(cex.get_root(),0);
|
// cex.get_tree()->ComputeUnderapprox(cex.get_root(),0);
|
||||||
RPFP::Node *under_node = CreateNodeInstance(node->map /* ,StratifiedLeafCount-- */);
|
RPFP::Node *under_node = CreateNodeInstance(node->map /* ,StratifiedLeafCount-- */);
|
||||||
|
@ -2250,7 +2249,7 @@ namespace Duality {
|
||||||
throw "stacks out of sync!";
|
throw "stacks out of sync!";
|
||||||
reporter->Depth(stack.size());
|
reporter->Depth(stack.size());
|
||||||
|
|
||||||
// res = tree->Solve(top, 1); // incremental solve, keep interpolants for one pop
|
// res = tree->Solve(top, 1); // incremental solve, keep interpolants for one pop
|
||||||
check_result foo = Check();
|
check_result foo = Check();
|
||||||
res = foo == unsat ? l_false : l_true;
|
res = foo == unsat ? l_false : l_true;
|
||||||
|
|
||||||
|
@ -2424,8 +2423,8 @@ namespace Duality {
|
||||||
hash_set<Node *> leaves_to_remove;
|
hash_set<Node *> leaves_to_remove;
|
||||||
for(unsigned i = 0; i < expansions.size(); i++){
|
for(unsigned i = 0; i < expansions.size(); i++){
|
||||||
Node *node = expansions[i];
|
Node *node = expansions[i];
|
||||||
// if(node != top)
|
// if(node != top)
|
||||||
// tree->ConstrainParent(node->Incoming[0],node);
|
//tree->ConstrainParent(node->Incoming[0],node);
|
||||||
std::vector<Node *> &cs = node->Outgoing->Children;
|
std::vector<Node *> &cs = node->Outgoing->Children;
|
||||||
for(unsigned i = 0; i < cs.size(); i++){
|
for(unsigned i = 0; i < cs.size(); i++){
|
||||||
leaves_to_remove.insert(cs[i]);
|
leaves_to_remove.insert(cs[i]);
|
||||||
|
@ -3467,7 +3466,7 @@ namespace Duality {
|
||||||
dnode->Bound.Formula = bound_fmla;
|
dnode->Bound.Formula = bound_fmla;
|
||||||
}
|
}
|
||||||
db_saved_bounds.push_back(bound_fmla);
|
db_saved_bounds.push_back(bound_fmla);
|
||||||
// dnode->Annotation.Formula = ctx.make(And,node->Annotation.Formula,ctx.make(Geq,dvar,ctx.int_val(0)));
|
// dnode->Annotation.Formula = ctx.make(And,node->Annotation.Formula,ctx.make(Geq,dvar,ctx.int_val(0)));
|
||||||
}
|
}
|
||||||
for(unsigned i = 0; i < rpfp->edges.size(); i++){
|
for(unsigned i = 0; i < rpfp->edges.size(); i++){
|
||||||
Edge *edge = rpfp->edges[i];
|
Edge *edge = rpfp->edges[i];
|
||||||
|
|
|
@ -727,7 +727,7 @@ namespace Duality {
|
||||||
if(!started){
|
if(!started){
|
||||||
sw.start();
|
sw.start();
|
||||||
started = true;
|
started = true;
|
||||||
}
|
}
|
||||||
return sw.get_current_seconds();
|
return sw.get_current_seconds();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -292,14 +292,14 @@ bool iz3base::is_sat(const std::vector<ast> &q, ast &_proof, std::vector<ast> &v
|
||||||
|
|
||||||
|
|
||||||
void iz3base::find_children(const stl_ext::hash_set<ast> &cnsts_set,
|
void iz3base::find_children(const stl_ext::hash_set<ast> &cnsts_set,
|
||||||
const ast &tree,
|
const ast &tree,
|
||||||
std::vector<ast> &cnsts,
|
std::vector<ast> &cnsts,
|
||||||
std::vector<int> &parents,
|
std::vector<int> &parents,
|
||||||
std::vector<ast> &conjuncts,
|
std::vector<ast> &conjuncts,
|
||||||
std::vector<int> &children,
|
std::vector<int> &children,
|
||||||
std::vector<int> &pos_map,
|
std::vector<int> &pos_map,
|
||||||
bool merge
|
bool merge
|
||||||
){
|
){
|
||||||
std::vector<int> my_children;
|
std::vector<int> my_children;
|
||||||
std::vector<ast> my_conjuncts;
|
std::vector<ast> my_conjuncts;
|
||||||
if(op(tree) == Interp){ // if we've hit an interpolation position...
|
if(op(tree) == Interp){ // if we've hit an interpolation position...
|
||||||
|
@ -336,13 +336,13 @@ void iz3base::find_children(const stl_ext::hash_set<ast> &cnsts_set,
|
||||||
}
|
}
|
||||||
|
|
||||||
void iz3base::to_parents_vec_representation(const std::vector<ast> &_cnsts,
|
void iz3base::to_parents_vec_representation(const std::vector<ast> &_cnsts,
|
||||||
const ast &tree,
|
const ast &tree,
|
||||||
std::vector<ast> &cnsts,
|
std::vector<ast> &cnsts,
|
||||||
std::vector<int> &parents,
|
std::vector<int> &parents,
|
||||||
std::vector<ast> &theory,
|
std::vector<ast> &theory,
|
||||||
std::vector<int> &pos_map,
|
std::vector<int> &pos_map,
|
||||||
bool merge
|
bool merge
|
||||||
){
|
){
|
||||||
std::vector<int> my_children;
|
std::vector<int> my_children;
|
||||||
std::vector<ast> my_conjuncts;
|
std::vector<ast> my_conjuncts;
|
||||||
hash_set<ast> cnsts_set;
|
hash_set<ast> cnsts_set;
|
||||||
|
|
|
@ -192,35 +192,35 @@ std::vector<T> to_std_vector(const ::vector<T> &v){
|
||||||
|
|
||||||
|
|
||||||
bool iz3check(ast_manager &_m_manager,
|
bool iz3check(ast_manager &_m_manager,
|
||||||
solver *s,
|
solver *s,
|
||||||
std::ostream &err,
|
std::ostream &err,
|
||||||
const ptr_vector<ast> &cnsts,
|
const ptr_vector<ast> &cnsts,
|
||||||
const ::vector<int> &parents,
|
const ::vector<int> &parents,
|
||||||
const ptr_vector<ast> &interps,
|
const ptr_vector<ast> &interps,
|
||||||
const ptr_vector<ast> &theory)
|
const ptr_vector<ast> &theory)
|
||||||
{
|
{
|
||||||
iz3checker chk(_m_manager);
|
iz3checker chk(_m_manager);
|
||||||
return chk.check(s,err,chk.cook(cnsts),to_std_vector(parents),chk.cook(interps),chk.cook(theory));
|
return chk.check(s,err,chk.cook(cnsts),to_std_vector(parents),chk.cook(interps),chk.cook(theory));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool iz3check(iz3mgr &mgr,
|
bool iz3check(iz3mgr &mgr,
|
||||||
solver *s,
|
solver *s,
|
||||||
std::ostream &err,
|
std::ostream &err,
|
||||||
const std::vector<iz3mgr::ast> &cnsts,
|
const std::vector<iz3mgr::ast> &cnsts,
|
||||||
const std::vector<int> &parents,
|
const std::vector<int> &parents,
|
||||||
const std::vector<iz3mgr::ast> &interps,
|
const std::vector<iz3mgr::ast> &interps,
|
||||||
const std::vector<iz3mgr::ast> &theory)
|
const std::vector<iz3mgr::ast> &theory)
|
||||||
{
|
{
|
||||||
iz3checker chk(mgr);
|
iz3checker chk(mgr);
|
||||||
return chk.check(s,err,cnsts,parents,interps,theory);
|
return chk.check(s,err,cnsts,parents,interps,theory);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool iz3check(ast_manager &_m_manager,
|
bool iz3check(ast_manager &_m_manager,
|
||||||
solver *s,
|
solver *s,
|
||||||
std::ostream &err,
|
std::ostream &err,
|
||||||
const ptr_vector<ast> &_cnsts,
|
const ptr_vector<ast> &_cnsts,
|
||||||
ast *tree,
|
ast *tree,
|
||||||
const ptr_vector<ast> &interps)
|
const ptr_vector<ast> &interps)
|
||||||
{
|
{
|
||||||
iz3checker chk(_m_manager);
|
iz3checker chk(_m_manager);
|
||||||
return chk.check(s,err,chk.cook(_cnsts),chk.cook(tree),chk.cook(interps));
|
return chk.check(s,err,chk.cook(_cnsts),chk.cook(tree),chk.cook(interps));
|
||||||
|
|
|
@ -420,12 +420,12 @@ public:
|
||||||
|
|
||||||
|
|
||||||
void iz3interpolate(ast_manager &_m_manager,
|
void iz3interpolate(ast_manager &_m_manager,
|
||||||
ast *proof,
|
ast *proof,
|
||||||
const ptr_vector<ast> &cnsts,
|
const ptr_vector<ast> &cnsts,
|
||||||
const ::vector<int> &parents,
|
const ::vector<int> &parents,
|
||||||
ptr_vector<ast> &interps,
|
ptr_vector<ast> &interps,
|
||||||
const ptr_vector<ast> &theory,
|
const ptr_vector<ast> &theory,
|
||||||
interpolation_options_struct * options)
|
interpolation_options_struct * options)
|
||||||
{
|
{
|
||||||
iz3interp itp(_m_manager);
|
iz3interp itp(_m_manager);
|
||||||
if(options)
|
if(options)
|
||||||
|
@ -448,12 +448,12 @@ void iz3interpolate(ast_manager &_m_manager,
|
||||||
}
|
}
|
||||||
|
|
||||||
void iz3interpolate(ast_manager &_m_manager,
|
void iz3interpolate(ast_manager &_m_manager,
|
||||||
ast *proof,
|
ast *proof,
|
||||||
const ::vector<ptr_vector<ast> > &cnsts,
|
const ::vector<ptr_vector<ast> > &cnsts,
|
||||||
const ::vector<int> &parents,
|
const ::vector<int> &parents,
|
||||||
ptr_vector<ast> &interps,
|
ptr_vector<ast> &interps,
|
||||||
const ptr_vector<ast> &theory,
|
const ptr_vector<ast> &theory,
|
||||||
interpolation_options_struct * options)
|
interpolation_options_struct * options)
|
||||||
{
|
{
|
||||||
iz3interp itp(_m_manager);
|
iz3interp itp(_m_manager);
|
||||||
if(options)
|
if(options)
|
||||||
|
@ -477,11 +477,11 @@ void iz3interpolate(ast_manager &_m_manager,
|
||||||
}
|
}
|
||||||
|
|
||||||
void iz3interpolate(ast_manager &_m_manager,
|
void iz3interpolate(ast_manager &_m_manager,
|
||||||
ast *proof,
|
ast *proof,
|
||||||
const ptr_vector<ast> &cnsts,
|
const ptr_vector<ast> &cnsts,
|
||||||
ast *tree,
|
ast *tree,
|
||||||
ptr_vector<ast> &interps,
|
ptr_vector<ast> &interps,
|
||||||
interpolation_options_struct * options)
|
interpolation_options_struct * options)
|
||||||
{
|
{
|
||||||
iz3interp itp(_m_manager);
|
iz3interp itp(_m_manager);
|
||||||
if(options)
|
if(options)
|
||||||
|
@ -506,12 +506,12 @@ void iz3interpolate(ast_manager &_m_manager,
|
||||||
}
|
}
|
||||||
|
|
||||||
lbool iz3interpolate(ast_manager &_m_manager,
|
lbool iz3interpolate(ast_manager &_m_manager,
|
||||||
solver &s,
|
solver &s,
|
||||||
ast *tree,
|
ast *tree,
|
||||||
ptr_vector<ast> &cnsts,
|
ptr_vector<ast> &cnsts,
|
||||||
ptr_vector<ast> &interps,
|
ptr_vector<ast> &interps,
|
||||||
model_ref &m,
|
model_ref &m,
|
||||||
interpolation_options_struct * options)
|
interpolation_options_struct * options)
|
||||||
{
|
{
|
||||||
iz3interp itp(_m_manager);
|
iz3interp itp(_m_manager);
|
||||||
if(options)
|
if(options)
|
||||||
|
|
|
@ -107,9 +107,9 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
void iz3pp(ast_manager &m,
|
void iz3pp(ast_manager &m,
|
||||||
const ptr_vector<expr> &cnsts_vec,
|
const ptr_vector<expr> &cnsts_vec,
|
||||||
expr *tree,
|
expr *tree,
|
||||||
std::ostream& out) {
|
std::ostream& out) {
|
||||||
|
|
||||||
unsigned sz = cnsts_vec.size();
|
unsigned sz = cnsts_vec.size();
|
||||||
expr* const* cnsts = &cnsts_vec[0];
|
expr* const* cnsts = &cnsts_vec[0];
|
||||||
|
|
|
@ -778,7 +778,7 @@ class iz3proof_itp_impl : public iz3proof_itp {
|
||||||
sum_cond_ineq(ineq2,make_int("1"),yleqx,Aproves2,Bproves2);
|
sum_cond_ineq(ineq2,make_int("1"),yleqx,Aproves2,Bproves2);
|
||||||
ast Bcond = my_implies(Bproves1,my_and(Aproves1,z3_simplify(ineq2)));
|
ast Bcond = my_implies(Bproves1,my_and(Aproves1,z3_simplify(ineq2)));
|
||||||
// if(!is_true(Aproves1) || !is_true(Bproves1))
|
// if(!is_true(Aproves1) || !is_true(Bproves1))
|
||||||
// std::cout << "foo!\n";;
|
// std::cout << "foo!\n";;
|
||||||
if(y == make_int(rational(0)) && op(x) == Plus && num_args(x) == 2){
|
if(y == make_int(rational(0)) && op(x) == Plus && num_args(x) == 2){
|
||||||
if(get_term_type(arg(x,0)) == LitA){
|
if(get_term_type(arg(x,0)) == LitA){
|
||||||
ast iter = z3_simplify(make(Plus,arg(x,0),get_ineq_rhs(xleqy)));
|
ast iter = z3_simplify(make(Plus,arg(x,0),get_ineq_rhs(xleqy)));
|
||||||
|
@ -2784,7 +2784,7 @@ class iz3proof_itp_impl : public iz3proof_itp {
|
||||||
}
|
}
|
||||||
else if(o == Plus || o == Times){ // don't want bound variables inside arith ops
|
else if(o == Plus || o == Times){ // don't want bound variables inside arith ops
|
||||||
// std::cout << "WARNING: non-local arithmetic\n";
|
// std::cout << "WARNING: non-local arithmetic\n";
|
||||||
// frng = erng; // this term will be localized
|
// frng = erng; // this term will be localized
|
||||||
}
|
}
|
||||||
else if(o == Select){ // treat the array term like a function symbol
|
else if(o == Select){ // treat the array term like a function symbol
|
||||||
prover::range srng = pv->ast_scope(arg(e,0));
|
prover::range srng = pv->ast_scope(arg(e,0));
|
||||||
|
|
|
@ -612,7 +612,7 @@ public:
|
||||||
rng = range_glb(rng,ast_scope(lit));
|
rng = range_glb(rng,ast_scope(lit));
|
||||||
}
|
}
|
||||||
if(range_is_empty(rng)) return -1;
|
if(range_is_empty(rng)) return -1;
|
||||||
int hi = range_max(rng);
|
int hi = range_max(rng);
|
||||||
if(hi >= frames) return frames - 1;
|
if(hi >= frames) return frames - 1;
|
||||||
return hi;
|
return hi;
|
||||||
}
|
}
|
||||||
|
@ -2003,10 +2003,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
iz3translation_full(iz3mgr &mgr,
|
iz3translation_full(iz3mgr &mgr,
|
||||||
iz3secondary *_secondary,
|
iz3secondary *_secondary,
|
||||||
const std::vector<std::vector<ast> > &cnsts,
|
const std::vector<std::vector<ast> > &cnsts,
|
||||||
const std::vector<int> &parents,
|
const std::vector<int> &parents,
|
||||||
const std::vector<ast> &theory)
|
const std::vector<ast> &theory)
|
||||||
: iz3translation(mgr, cnsts, parents, theory)
|
: iz3translation(mgr, cnsts, parents, theory)
|
||||||
{
|
{
|
||||||
frames = cnsts.size();
|
frames = cnsts.size();
|
||||||
|
@ -2027,10 +2027,10 @@ public:
|
||||||
#ifdef IZ3_TRANSLATE_FULL
|
#ifdef IZ3_TRANSLATE_FULL
|
||||||
|
|
||||||
iz3translation *iz3translation::create(iz3mgr &mgr,
|
iz3translation *iz3translation::create(iz3mgr &mgr,
|
||||||
iz3secondary *secondary,
|
iz3secondary *secondary,
|
||||||
const std::vector<std::vector<ast> > &cnsts,
|
const std::vector<std::vector<ast> > &cnsts,
|
||||||
const std::vector<int> &parents,
|
const std::vector<int> &parents,
|
||||||
const std::vector<ast> &theory){
|
const std::vector<ast> &theory){
|
||||||
return new iz3translation_full(mgr,secondary,cnsts,parents,theory);
|
return new iz3translation_full(mgr,secondary,cnsts,parents,theory);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -589,7 +589,7 @@ public:
|
||||||
rng = range_glb(rng,ast_scope(lit));
|
rng = range_glb(rng,ast_scope(lit));
|
||||||
}
|
}
|
||||||
if(range_is_empty(rng)) return -1;
|
if(range_is_empty(rng)) return -1;
|
||||||
int hi = range_max(rng);
|
int hi = range_max(rng);
|
||||||
if(hi >= frames) return frames - 1;
|
if(hi >= frames) return frames - 1;
|
||||||
return hi;
|
return hi;
|
||||||
}
|
}
|
||||||
|
@ -881,7 +881,7 @@ public:
|
||||||
|| dk == PR_QUANT_INST
|
|| dk == PR_QUANT_INST
|
||||||
//|| dk == PR_UNIT_RESOLUTION
|
//|| dk == PR_UNIT_RESOLUTION
|
||||||
//|| dk == PR_LEMMA
|
//|| dk == PR_LEMMA
|
||||||
)
|
)
|
||||||
return false;
|
return false;
|
||||||
if(dk == PR_HYPOTHESIS && hyps.find(con) != hyps.end())
|
if(dk == PR_HYPOTHESIS && hyps.find(con) != hyps.end())
|
||||||
; //std::cout << "blif!\n";
|
; //std::cout << "blif!\n";
|
||||||
|
|
|
@ -584,7 +584,7 @@ namespace datalog {
|
||||||
m_rule_properties.check_existential_tail();
|
m_rule_properties.check_existential_tail();
|
||||||
m_rule_properties.check_for_negated_predicates();
|
m_rule_properties.check_for_negated_predicates();
|
||||||
break;
|
break;
|
||||||
case DUALITY_ENGINE:
|
case DUALITY_ENGINE:
|
||||||
m_rule_properties.collect(r);
|
m_rule_properties.collect(r);
|
||||||
m_rule_properties.check_existential_tail();
|
m_rule_properties.check_existential_tail();
|
||||||
m_rule_properties.check_for_negated_predicates();
|
m_rule_properties.check_for_negated_predicates();
|
||||||
|
@ -986,12 +986,12 @@ namespace datalog {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void context::get_raw_rule_formulas(expr_ref_vector& rules, svector<symbol>& names, vector<unsigned> &bounds){
|
void context::get_raw_rule_formulas(expr_ref_vector& rules, svector<symbol>& names, vector<unsigned> &bounds) {
|
||||||
for (unsigned i = 0; i < m_rule_fmls.size(); ++i) {
|
for (unsigned i = 0; i < m_rule_fmls.size(); ++i) {
|
||||||
expr_ref r = bind_vars(m_rule_fmls[i].get(), true);
|
expr_ref r = bind_vars(m_rule_fmls[i].get(), true);
|
||||||
rules.push_back(r.get());
|
rules.push_back(r.get());
|
||||||
names.push_back(m_rule_names[i]);
|
names.push_back(m_rule_names[i]);
|
||||||
bounds.push_back(m_rule_bounds[i]);
|
bounds.push_back(m_rule_bounds[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -329,7 +329,7 @@ int main(int argc, char ** argv) {
|
||||||
g_input_kind = IN_SMTLIB;
|
g_input_kind = IN_SMTLIB;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (g_input_kind) {
|
switch (g_input_kind) {
|
||||||
case IN_SMTLIB:
|
case IN_SMTLIB:
|
||||||
return_value = read_smtlib_file(g_input_file);
|
return_value = read_smtlib_file(g_input_file);
|
||||||
|
|
|
@ -336,17 +336,17 @@ void mpz_manager<SYNCH>::set(mpz & target, unsigned sz, digit_t const * digits)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
mk_big(target);
|
mk_big(target);
|
||||||
// reset
|
// reset
|
||||||
mpz_set_ui(*target.m_ptr, digits[sz - 1]);
|
mpz_set_ui(*target.m_ptr, digits[sz - 1]);
|
||||||
SASSERT(sz > 0);
|
SASSERT(sz > 0);
|
||||||
unsigned i = sz - 1;
|
unsigned i = sz - 1;
|
||||||
while (i > 0) {
|
while (i > 0) {
|
||||||
--i;
|
--i;
|
||||||
mpz_mul_2exp(*target.m_ptr, *target.m_ptr, 32);
|
mpz_mul_2exp(*target.m_ptr, *target.m_ptr, 32);
|
||||||
mpz_set_ui(m_tmp, digits[i]);
|
mpz_set_ui(m_tmp, digits[i]);
|
||||||
mpz_add(*target.m_ptr, *target.m_ptr, m_tmp);
|
mpz_add(*target.m_ptr, *target.m_ptr, m_tmp);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2037,16 +2037,16 @@ bool mpz_manager<SYNCH>::decompose(mpz const & a, svector<digit_t> & digits) {
|
||||||
}
|
}
|
||||||
return a.m_val < 0;
|
return a.m_val < 0;
|
||||||
#else
|
#else
|
||||||
bool r = is_neg(a);
|
bool r = is_neg(a);
|
||||||
mpz_set(m_tmp, *a.m_ptr);
|
mpz_set(m_tmp, *a.m_ptr);
|
||||||
mpz_abs(m_tmp, m_tmp);
|
mpz_abs(m_tmp, m_tmp);
|
||||||
while (mpz_sgn(m_tmp) != 0) {
|
while (mpz_sgn(m_tmp) != 0) {
|
||||||
mpz_tdiv_r_2exp(m_tmp2, m_tmp, 32);
|
mpz_tdiv_r_2exp(m_tmp2, m_tmp, 32);
|
||||||
unsigned v = mpz_get_ui(m_tmp2);
|
unsigned v = mpz_get_ui(m_tmp2);
|
||||||
digits.push_back(v);
|
digits.push_back(v);
|
||||||
mpz_tdiv_q_2exp(m_tmp, m_tmp, 32);
|
mpz_tdiv_q_2exp(m_tmp, m_tmp, 32);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue