void CegGrammarConstructor::collectTerms(
Node n, std::map<TypeNode, std::unordered_set<Node>>& consts)
{
+ NodeManager * nm = NodeManager::currentNM();
std::unordered_map<TNode, bool> visited;
std::unordered_map<TNode, bool>::iterator it;
std::stack<TNode> visit;
TypeNode tn = cur.getType();
Node c = cur;
if( tn.isReal() ){
- c = NodeManager::currentNM()->mkConst( c.getConst<Rational>().abs() );
+ c = nm->mkConst( c.getConst<Rational>().abs() );
}
- if( std::find( consts[tn].begin(), consts[tn].end(), c )==consts[tn].end() ){
- Trace("cegqi-debug") << "...consider const : " << c << std::endl;
- consts[tn].insert(c);
+ consts[tn].insert(c);
+ if (tn.isInteger())
+ {
+ TypeNode rtype = nm->realType();
+ consts[rtype].insert(c);
}
}
// recurse
# Regression level 1 tests
set(regress_1_tests
+ regress1/abduction/abd-real-const.smt2
regress1/abduction/sygus-abduct-test-user.smt2
regress1/abduction/issue5848-4.smt2
regress1/abduction/issue5848-2.smt2
--- /dev/null
+; COMMAND-LINE: --produce-abducts
+; SCRUBBER: grep -v -E '(\(define-fun)'
+; EXIT: 0
+(set-logic QF_LRA)
+(declare-const x Real)
+(declare-const y Real)
+(declare-const z Real)
+(assert (and (>= x 0) (< y 7)))
+(get-abduct A (>= y 5))