From 9f219f1cd4693d2484f344f5186e37b7bd63405b Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Wed, 3 Oct 2018 13:51:21 -0500 Subject: [PATCH] Fix stale op list in sets (#2572) --- src/theory/sets/theory_sets_private.cpp | 2 +- test/regress/CMakeLists.txt | 1 + test/regress/Makefile.tests | 1 + test/regress/regress1/sets/issue2568.smt2 | 21 +++++++++++++++++++++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 test/regress/regress1/sets/issue2568.smt2 diff --git a/src/theory/sets/theory_sets_private.cpp b/src/theory/sets/theory_sets_private.cpp index 317080ba6..ec6406a6a 100644 --- a/src/theory/sets/theory_sets_private.cpp +++ b/src/theory/sets/theory_sets_private.cpp @@ -2247,7 +2247,7 @@ Theory::PPAssertStatus TheorySetsPrivate::ppAssert(TNode in, SubstitutionMap& ou } void TheorySetsPrivate::presolve() { - + d_op_list.clear(); } /**************************** eq::NotifyClass *****************************/ diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index bec5362e5..0c68b1920 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -1466,6 +1466,7 @@ set(regress_1_tests regress1/sets/fuzz15201.smt2 regress1/sets/fuzz31811.smt2 regress1/sets/insert_invariant_37_2.smt2 + regress1/sets/issue2568.smt2 regress1/sets/lemmabug-ListElts317minimized.smt2 regress1/sets/remove_check_free_31_6.smt2 regress1/sets/sets-disequal.smt2 diff --git a/test/regress/Makefile.tests b/test/regress/Makefile.tests index 37c911d41..4e77694b7 100644 --- a/test/regress/Makefile.tests +++ b/test/regress/Makefile.tests @@ -1463,6 +1463,7 @@ REG1_TESTS = \ regress1/sets/fuzz15201.smt2 \ regress1/sets/fuzz31811.smt2 \ regress1/sets/insert_invariant_37_2.smt2 \ + regress1/sets/issue2568.smt2 \ regress1/sets/lemmabug-ListElts317minimized.smt2 \ regress1/sets/remove_check_free_31_6.smt2 \ regress1/sets/sets-disequal.smt2 \ diff --git a/test/regress/regress1/sets/issue2568.smt2 b/test/regress/regress1/sets/issue2568.smt2 new file mode 100644 index 000000000..bb76e7368 --- /dev/null +++ b/test/regress/regress1/sets/issue2568.smt2 @@ -0,0 +1,21 @@ +; COMMAND-LINE: --lang=smt2.5 +; EXPECT: sat +; EXPECT: sat +(set-logic ALL) + +(declare-datatypes () ((Unit (uu)))) + +(declare-fun y () Int) +(declare-fun b () Bool) +(declare-fun s () (Set Int)) +(declare-fun u () Unit) + +(assert (= s (insert y s))) +(assert (=> b (= uu u))) + +(push 1) +(check-sat) +(pop 1) + +(push 1) +(check-sat) -- 2.30.2