summaryrefslogtreecommitdiff
path: root/test/regress/regress0/sep
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-09-14 12:49:58 -0500
committerGitHub <noreply@github.com>2020-09-14 12:49:58 -0500
commit92a007b4a35a925c92eafc29df5bacacac75f6f9 (patch)
treeaf69c6aa8cf3ff5470c25aca27d8d340d9d0b141 /test/regress/regress0/sep
parentc82d061abb0c011da2700051b7a0548f5d59904b (diff)
Refactoring the rewriter of sets (#4856)
Changes it so that we don't flatten unions if at least one child is non-constant, since this may lead to children that are non-constant by mixing constant/non-constant elements and is generally expensive for large unions of singleton elements. The previous rewriting policy was causing an incorrect model in a separation logic benchmark reported by Andrew Jones, due to unions of constant elements that were unsorted (and hence not considered constants). We now have the invariant that all subterms that are unions of constant elements are set constants. Note this PR changes the normal form of set constants to be (union (singleton c1) ... (union (singleton cn-1) (singleton cn) ... ) not (union ... (union (singleton c1) (singleton c2)) ... (singleton cn)). It changes a unit test which was impacted by this change which was failing due to hardcoding the enumeration order in the unit test. The test is now agnostic to the order of elements.
Diffstat (limited to 'test/regress/regress0/sep')
-rw-r--r--test/regress/regress0/sep/simple-080420-const-sets.smt214
1 files changed, 14 insertions, 0 deletions
diff --git a/test/regress/regress0/sep/simple-080420-const-sets.smt2 b/test/regress/regress0/sep/simple-080420-const-sets.smt2
new file mode 100644
index 000000000..1d85fb133
--- /dev/null
+++ b/test/regress/regress0/sep/simple-080420-const-sets.smt2
@@ -0,0 +1,14 @@
+; COMMAND-LINE: --no-check-models
+; EXPECT: sat
+(set-logic QF_ALL_SUPPORTED)
+(set-option :produce-models true)
+(set-info :status sat)
+(declare-fun x () Int)
+
+; works
+;(assert (sep (pto 1 2) (pto 5 6) (pto x 8)))
+
+; didn't work due to sets rewriter
+(assert (sep (pto 1 2) (pto 5 6) (pto 7 8)))
+
+(check-sat)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback