From 2c12b0b23f0d3e745e679d76d18ede9d8bbf6d3a Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Wed, 22 Jan 2020 14:53:37 -0600 Subject: [PATCH] Fix check for subtypes in sygus PBE (#3640) --- src/theory/quantifiers/sygus/sygus_pbe.cpp | 2 +- test/regress/CMakeLists.txt | 1 + test/regress/regress1/sygus/issue3634.smt2 | 7 +++++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 test/regress/regress1/sygus/issue3634.smt2 diff --git a/src/theory/quantifiers/sygus/sygus_pbe.cpp b/src/theory/quantifiers/sygus/sygus_pbe.cpp index 0fa857c91..5468a1e6a 100644 --- a/src/theory/quantifiers/sygus/sygus_pbe.cpp +++ b/src/theory/quantifiers/sygus/sygus_pbe.cpp @@ -420,7 +420,7 @@ Node SygusPbe::addSearchVal(TypeNode tn, Node e, Node bvr) d_sygus_unif[ee].clearExampleCache(e, bvr); } } - Assert(ret.getType() == bvr.getType()); + Assert(ret.getType().isComparableTo(bvr.getType())); return ret; } return Node::null(); diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index ed9ddda1b..8212c21f1 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -1784,6 +1784,7 @@ set(regress_1_tests regress1/sygus/issue3514.smt2 regress1/sygus/issue3507.smt2 regress1/sygus/issue3580.sy + regress1/sygus/issue3634.smt2 regress1/sygus/large-const-simp.sy regress1/sygus/let-bug-simp.sy regress1/sygus/list-head-x.sy diff --git a/test/regress/regress1/sygus/issue3634.smt2 b/test/regress/regress1/sygus/issue3634.smt2 new file mode 100644 index 000000000..c7d5f9126 --- /dev/null +++ b/test/regress/regress1/sygus/issue3634.smt2 @@ -0,0 +1,7 @@ +; EXPECT: sat +; COMMAND-LINE: --sygus-inference +(set-logic ALL) +(declare-fun a () Int) +(declare-fun b () Real) +(assert (= (/ 1 (to_real a)) b)) +(check-sat) -- 2.30.2