diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2020-05-20 21:22:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 21:22:25 -0500 |
commit | 7c0b92c30688d8c7830bf3611213e96026ecf1f5 (patch) | |
tree | 4f7d59acbaef10c7884ba18a71205b26743ecc18 | |
parent | 7225f8f14ea0de0eca4c49ec3a2616196074d4d3 (diff) |
Fix missing check for cardinality one in unconstrained simplifier (#4504)
Fixes #4482.
-rw-r--r-- | src/preprocessing/passes/unconstrained_simplifier.cpp | 4 | ||||
-rw-r--r-- | test/regress/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/regress/regress0/datatypes/4482-unc-simp-one.smt2 | 5 |
3 files changed, 10 insertions, 0 deletions
diff --git a/src/preprocessing/passes/unconstrained_simplifier.cpp b/src/preprocessing/passes/unconstrained_simplifier.cpp index 7cf6a79bd..5d544ae57 100644 --- a/src/preprocessing/passes/unconstrained_simplifier.cpp +++ b/src/preprocessing/passes/unconstrained_simplifier.cpp @@ -236,6 +236,10 @@ void UnconstrainedSimplifier::processUnconstrained() break; } } + if (parent[0].getType().getCardinality().isOne()) + { + break; + } if (parent[0].getType().isDatatype()) { TypeNode tn = parent[0].getType(); diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index ea98cf819..506857479 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -375,6 +375,7 @@ set(regress_0_tests regress0/cvc3.userdoc.05.cvc regress0/cvc3.userdoc.06.cvc regress0/cvc-rerror-print.cvc + regress0/datatypes/4482-unc-simp-one.smt2 regress0/datatypes/Test1-tup-mp.cvc regress0/datatypes/boolean-equality.cvc regress0/datatypes/boolean-terms-datatype.cvc diff --git a/test/regress/regress0/datatypes/4482-unc-simp-one.smt2 b/test/regress/regress0/datatypes/4482-unc-simp-one.smt2 new file mode 100644 index 000000000..265aeef23 --- /dev/null +++ b/test/regress/regress0/datatypes/4482-unc-simp-one.smt2 @@ -0,0 +1,5 @@ +(set-logic ALL) +(set-info :status unsat) +(declare-fun a () Tuple) +(assert (distinct a mkTuple)) +(check-sat) |