*(d_iteUtilities.getContainsVisitor());
arith::ArithIteUtils aiteu(contains,
d_preprocContext->getUserContext(),
- theory_engine->getModel());
+ d_preprocContext->getTopLevelSubstitutions().get());
bool anyItes = false;
for (size_t i = 0, size = assertionsToPreprocess->size(); i < size; ++i)
{
ArithIteUtils::ArithIteUtils(
preprocessing::util::ContainsTermITEVisitor& contains,
context::Context* uc,
- TheoryModel* model)
+ SubstitutionMap& subs)
: d_contains(contains),
- d_subs(NULL),
- d_model(model),
+ d_subs(subs),
d_one(1),
d_subcount(uc, 0),
d_skolems(uc),
d_implies(),
d_orBinEqs()
{
- d_subs = new SubstitutionMap(uc);
}
ArithIteUtils::~ArithIteUtils(){
- delete d_subs;
- d_subs = NULL;
}
void ArithIteUtils::clear(){
void ArithIteUtils::addSubstitution(TNode f, TNode t){
Debug("arith::ite") << "adding " << f << " -> " << t << endl;
d_subcount = d_subcount + 1;
- d_subs->addSubstitution(f, t);
+ d_subs.addSubstitution(f, t);
}
Node ArithIteUtils::applySubstitutions(TNode f){
AlwaysAssert(!options::incrementalSolving());
- return d_subs->apply(f);
+ return d_subs.apply(f);
}
Node ArithIteUtils::selectForCmp(Node n) const{
namespace theory {
class SubstitutionMap;
-class TheoryModel;
namespace arith {
class ArithIteUtils {
preprocessing::util::ContainsTermITEVisitor& d_contains;
- SubstitutionMap* d_subs;
- TheoryModel* d_model;
+ SubstitutionMap& d_subs;
typedef std::unordered_map<Node, Node> NodeMap;
// cache for reduce vars
public:
ArithIteUtils(preprocessing::util::ContainsTermITEVisitor& contains,
context::Context* userContext,
- TheoryModel* model);
+ SubstitutionMap& subs);
~ArithIteUtils();
//(ite ?v_2 ?v_1 (ite ?v_3 (- ?v_1 128) (- ?v_1 256)))