Fix single invocation partition for non-function non-atomic types (#3642)
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>
Wed, 22 Jan 2020 21:27:46 +0000 (15:27 -0600)
committerGitHub <noreply@github.com>
Wed, 22 Jan 2020 21:27:46 +0000 (15:27 -0600)
src/theory/quantifiers/single_inv_partition.cpp
test/regress/CMakeLists.txt
test/regress/regress1/sygus/issue3635.smt2 [new file with mode: 0644]

index c713ec1ddb3ea5697d635c4d912fb2033621b768..6c7a06ebe210b7459cedbbf7a85291c912c55920 100644 (file)
@@ -513,8 +513,8 @@ bool SingleInvocationPartition::isAntiSkolemizableType(Node f)
   {
     TypeNode tn = f.getType();
     bool ret = false;
-    if (tn.getNumChildren() == d_arg_types.size() + 1
-        || (d_arg_types.empty() && tn.getNumChildren() == 0))
+    if (((tn.isFunction() && tn.getNumChildren() == d_arg_types.size() + 1)
+         || (d_arg_types.empty() && tn.getNumChildren() == 0)))
     {
       ret = true;
       std::vector<Node> children;
index 8212c21f10494ebcfdaf2b1eb2d18f4e54fde1a9..5020fe6fdae1d274d176826ef496baf8250b6cc7 100644 (file)
@@ -1785,6 +1785,7 @@ set(regress_1_tests
   regress1/sygus/issue3507.smt2
   regress1/sygus/issue3580.sy
   regress1/sygus/issue3634.smt2
+  regress1/sygus/issue3635.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/issue3635.smt2 b/test/regress/regress1/sygus/issue3635.smt2
new file mode 100644 (file)
index 0000000..23f9d3e
--- /dev/null
@@ -0,0 +1,7 @@
+; EXPECT: sat
+; COMMAND-LINE: --sygus-inference
+(set-logic ALL)
+(declare-fun a () (Array Int Int))
+(declare-fun b () (Array Int Int))
+(assert (= a b))
+(check-sat)