From b61f6f4a23bb3b8650fbb0fe6b96bb27012a6139 Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Sat, 8 Mar 2014 15:33:46 -0500 Subject: [PATCH] Re-fix bug 551 by adding a check to the arith ITE simplifier to ignore non-ground ITEs also. --- src/theory/arith/arith_static_learner.cpp | 6 ++++++ src/util/ite_removal.cpp | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/theory/arith/arith_static_learner.cpp b/src/theory/arith/arith_static_learner.cpp index 3854188e0..b9260c906 100644 --- a/src/theory/arith/arith_static_learner.cpp +++ b/src/theory/arith/arith_static_learner.cpp @@ -109,6 +109,12 @@ void ArithStaticLearner::process(TNode n, NodeBuilder<>& learned, const TNodeSet switch(n.getKind()){ case ITE: + if(n.hasBoundVar()) { + // Unsafe with non-ground ITEs; do nothing + Debug("arith::static") << "(potentially) non-ground ITE, ignoring..." << endl; + break; + } + if(n[0].getKind() != EQUAL && isRelationOperator(n[0].getKind()) ){ iteMinMax(n, learned); diff --git a/src/util/ite_removal.cpp b/src/util/ite_removal.cpp index 1ceedc688..1b29f9ef8 100644 --- a/src/util/ite_removal.cpp +++ b/src/util/ite_removal.cpp @@ -91,7 +91,6 @@ Node RemoveITE::run(TNode node, std::vector& output, if(node.getKind() == kind::ITE) { TypeNode nodeType = node.getType(); if(!nodeType.isBoolean() && (!inQuant || !node.hasBoundVar())) { -Debug("ite") << "CAN REMOVE ITE " << node << " BECAUSE " << inQuant << " " << node.hasBoundVar() << endl; Node skolem; // Make the skolem to represent the ITE skolem = nodeManager->mkSkolem("termITE_$$", nodeType, "a variable introduced due to term-level ITE removal"); -- 2.30.2