From f1b58cf3d090d252e9349d491c4b43c46bf52b0e Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Wed, 18 Mar 2020 20:13:27 -0500 Subject: [PATCH] Fix issue with multiple infinities in CEGQI for LIRA (#4114) Fixes #4086. Quantifier instantiation involves two symbolic representations of infinities for real and int and was not handled correctly previously. --- src/theory/quantifiers/cegqi/vts_term_cache.cpp | 2 +- test/regress/CMakeLists.txt | 1 + test/regress/regress0/quantifiers/issue4086-infs.smt2 | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 test/regress/regress0/quantifiers/issue4086-infs.smt2 diff --git a/src/theory/quantifiers/cegqi/vts_term_cache.cpp b/src/theory/quantifiers/cegqi/vts_term_cache.cpp index 11c126eaf..91f65c4ef 100644 --- a/src/theory/quantifiers/cegqi/vts_term_cache.cpp +++ b/src/theory/quantifiers/cegqi/vts_term_cache.cpp @@ -144,7 +144,7 @@ Node VtsTermCache::rewriteVtsSymbols(Node n) std::vector subs_lhs; subs_lhs.push_back(inf); std::vector subs_rhs; - subs_lhs.push_back(rew_vts_inf); + subs_rhs.push_back(rew_vts_inf); n = n.substitute(subs_lhs.begin(), subs_lhs.end(), subs_rhs.begin(), diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index d822ce157..bffb2c4db 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -724,6 +724,7 @@ set(regress_0_tests regress0/quantifiers/issue2033-macro-arith.smt2 regress0/quantifiers/issue2035.smt2 regress0/quantifiers/issue3655.smt2 + regress0/quantifiers/issue4086-infs.smt2 regress0/quantifiers/lra-triv-gn.smt2 regress0/quantifiers/macros-int-real.smt2 regress0/quantifiers/macros-real-arg.smt2 diff --git a/test/regress/regress0/quantifiers/issue4086-infs.smt2 b/test/regress/regress0/quantifiers/issue4086-infs.smt2 new file mode 100644 index 000000000..2ebb45960 --- /dev/null +++ b/test/regress/regress0/quantifiers/issue4086-infs.smt2 @@ -0,0 +1,7 @@ +(set-logic LIRA) +(set-info :status unsat) +(set-option :cbqi-use-inf-int true) +(set-option :cbqi-use-inf-real true) +(set-option :var-ineq-elim-quant false) +(assert (forall (( b Real )) (forall (( c Int )) (and (> c (* b 2 )))))) +(check-sat) -- 2.30.2