The assertion can be violated in mixed Int/Real arithmetic. The instantiator utility nevertheless safe guards Int vs Real subtyping.
Fixes #7537.
Node n = it->second;
Trace("cegqi-inst-debug") << " " << d_input_vars[i] << " -> " << n
<< std::endl;
- Assert(n.getType().isSubtypeOf(d_input_vars[i].getType()));
+ Assert(n.getType().isComparableTo(d_input_vars[i].getType()));
subs.push_back( n );
}
}
Node v = d_input_vars[i];
Trace("cegqi-inst") << i << " (" << d_curr_iphase[v] << ") : "
<< v << " -> " << subs[i] << std::endl;
- Assert(subs[i].getType().isSubtypeOf(v.getType()));
+ Assert(subs[i].getType().isComparableTo(v.getType()));
}
}
Trace("cegqi-inst-debug") << "Do the instantiation...." << std::endl;
regress1/quantifiers/issue6775-vts-int.smt2
regress1/quantifiers/issue6845-nl-lemma-tc.smt2
regress1/quantifiers/issue7385-sygus-inst-i.smt2
+ regress1/quantifiers/issue7537-cegqi-comp-types.smt2
regress1/quantifiers/issue993.smt2
regress1/quantifiers/javafe.ast.StmtVec.009.smt2
regress1/quantifiers/lia-witness-div-pp.smt2
--- /dev/null
+(set-logic ALL)
+(set-info :status sat)
+(declare-fun r1 () Real)
+(declare-fun r5 () Real)
+(assert (forall ((q102 Int)) (or (= q102 (/ r1 r5)) (= (= 0.0 q102) (< 1.0 (/ r1 r5))))))
+(check-sat)