From: Andrew Reynolds Date: Wed, 27 Nov 2019 21:59:36 +0000 (-0600) Subject: Fix sygus inference for choice functions introduced at preprocess (#3500) X-Git-Tag: cvc5-1.0.0~3819 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5e2d39ccd22f38c6a3f2aab24136b07b65b3f81e;p=cvc5.git Fix sygus inference for choice functions introduced at preprocess (#3500) --- diff --git a/src/preprocessing/passes/sygus_inference.cpp b/src/preprocessing/passes/sygus_inference.cpp index 930edf869..6708f3c3a 100644 --- a/src/preprocessing/passes/sygus_inference.cpp +++ b/src/preprocessing/passes/sygus_inference.cpp @@ -202,7 +202,7 @@ bool SygusInference::solveSygus(std::vector& assertions, == free_functions.end()); free_functions.push_back(cur); } - else if (cur.getKind() == FORALL) + else if (cur.isClosure()) { Trace("sygus-infer") << "...fail: non-top-level quantifier." << std::endl; diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index 2182beaa8..e7252834e 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -1722,6 +1722,7 @@ set(regress_1_tests regress1/sygus/issue3247.smt2 regress1/sygus/issue3320-quant.sy regress1/sygus/issue3461.sy + regress1/sygus/issue3498.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/issue3498.smt2 b/test/regress/regress1/sygus/issue3498.smt2 new file mode 100644 index 000000000..9fa8fdc1e --- /dev/null +++ b/test/regress/regress1/sygus/issue3498.smt2 @@ -0,0 +1,7 @@ +; EXPECT: sat +; COMMAND-LINE: --sygus-inference --no-check-models +(set-logic ALL) +(declare-fun x () Real) +(assert (= x 1)) +(assert (= (sqrt x) x)) +(check-sat)