diff options
author | Haniel Barbosa <hanielbbarbosa@gmail.com> | 2021-02-09 00:37:10 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-09 00:37:10 -0300 |
commit | d0a8c9b331022dce224c230c6b6d7edd416d5866 (patch) | |
tree | cabd0c8ac48394cec45d58833a9432318c962437 /test | |
parent | 5baad1b32525ca623aaddfe557a3020edc4fe0b1 (diff) |
[quantifiers] Fix prenex computation (#5879)
Previously our prenex computation could generate quantifiers of the form forall x y y. F, which would lead to an assertion failure in getFreeVariablesScope, as it assumes that no shadowing occurs. This commit makes the prenex computation take a set rather than a vector, thus avoiding duplications of prenexed variables. It also changes mkForall to take a constant vector, since it does not modify the given vector.
Fixes #5693
Diffstat (limited to 'test')
-rw-r--r-- | test/regress/CMakeLists.txt | 2 | ||||
-rw-r--r-- | test/regress/regress0/quantifiers/issue5693-prenex.smt2 | 7 | ||||
-rw-r--r-- | test/regress/regress1/quantifiers/prenex-scholl-smt08_RNDPRE_RNDPRE_4_6.smt2 | 19 |
3 files changed, 28 insertions, 0 deletions
diff --git a/test/regress/CMakeLists.txt b/test/regress/CMakeLists.txt index ddf810b0c..1e4f42ffd 100644 --- a/test/regress/CMakeLists.txt +++ b/test/regress/CMakeLists.txt @@ -847,6 +847,7 @@ set(regress_0_tests regress0/quantifiers/issue4437-unc-quant.smt2 regress0/quantifiers/issue4576.smt2 regress0/quantifiers/issue5645-dt-cm-spurious.smt2 + regress0/quantifiers/issue5693-prenex.smt2 regress0/quantifiers/lra-triv-gn.smt2 regress0/quantifiers/macros-int-real.smt2 regress0/quantifiers/macros-real-arg.smt2 @@ -1784,6 +1785,7 @@ set(regress_1_tests regress1/quantifiers/nra-interleave-inst.smt2 regress1/quantifiers/opisavailable-12.smt2 regress1/quantifiers/parametric-lists.smt2 + regress1/quantifiers/prenex-scholl-smt08_RNDPRE_RNDPRE_4_6.smt2 regress1/quantifiers/psyco-001-bv.smt2 regress1/quantifiers/psyco-107-bv.smt2 regress1/quantifiers/psyco-196.smt2 diff --git a/test/regress/regress0/quantifiers/issue5693-prenex.smt2 b/test/regress/regress0/quantifiers/issue5693-prenex.smt2 new file mode 100644 index 000000000..15ee0e7cf --- /dev/null +++ b/test/regress/regress0/quantifiers/issue5693-prenex.smt2 @@ -0,0 +1,7 @@ +; COMMAND-LINE: --full-saturate-quant -i --no-check-unsat-cores +; EXPECT: unsat +(set-logic ALL) +(set-option :pre-skolem-quant true) +(declare-fun v7 () Bool) +(assert (forall ((q49 Bool) (q55 Bool)) (xor v7 (exists ((q49 Bool)) (xor v7 q49 q49)) v7 (= q55 q49)))) +(check-sat)
\ No newline at end of file diff --git a/test/regress/regress1/quantifiers/prenex-scholl-smt08_RNDPRE_RNDPRE_4_6.smt2 b/test/regress/regress1/quantifiers/prenex-scholl-smt08_RNDPRE_RNDPRE_4_6.smt2 new file mode 100644 index 000000000..f0a4560d1 --- /dev/null +++ b/test/regress/regress1/quantifiers/prenex-scholl-smt08_RNDPRE_RNDPRE_4_6.smt2 @@ -0,0 +1,19 @@ +(set-info :smt-lib-version 2.6) +(set-logic LRA) +(set-info :source | + Scholl, Christoph; Disch, Stefan; Pigorsch, Florian and Kupferschmid, + Stefan; Using an SMT Solver and Craig Interpolation to Detect and Remove + Redundant Linear Constraints in Representations of Non-Convex Polyhedra. + Proceedings of 6th International Workshop on Satisfiability Modulo + Theories, Princeton, USA, July 2008. + <http://abs.informatik.uni-freiburg.de/smtbench/> +|) +(set-info :category "random") +(set-info :status unsat) +(declare-fun x1 () Real) +(declare-fun x2 () Real) +(declare-fun x3 () Real) +(declare-fun x4 () Real) +(assert (forall ((?x1 Real)) (exists ((?x2 Real)) (forall ((?x3 Real)) (exists ((?x4 Real)) (or (and (and (and (>= (+ (+ (* (- 54) ?x1) (* 62 ?x3)) (* (- 53) ?x4)) 79) (not (= (+ (+ (* (- 49) ?x1) (* 25 ?x2)) (* 51 ?x3)) 12))) (or (< (+ (+ (* 5 ?x1) (* 20 ?x2)) (* (- 1) ?x3)) 0) (not (= (+ (+ (* 58 ?x1) (* 61 ?x2)) (* 74 ?x3)) (- 18))))) (or (and (>= (+ (+ (* 48 ?x1) (* (- 47) ?x2)) (* 1 ?x4)) 61) (>= (+ (+ (* (- 19) ?x1) (* (- 80) ?x2)) (* (- 66) ?x3)) 25)) (and (<= (+ (+ (* (- 63) ?x2) (* (- 98) ?x3)) (* (- 4) ?x4)) (- 28)) (not (= (+ (+ (+ (* 10 ?x1) (* 47 ?x2)) (* 77 ?x3)) (* 73 ?x4)) 72))))) (and (or (or (= (+ (+ (* 40 ?x1) (* 16 ?x3)) (* 33 ?x4)) 0) (not (= (+ (+ (* 94 ?x2) (* (- 32) ?x3)) (* (- 19) ?x4)) (- 6)))) (or (not (= (+ (+ (+ (* (- 8) ?x1) (* (- 45) ?x2)) (* 34 ?x3)) (* 11 ?x4)) 57)) (> (+ (* (- 7) ?x2) (* (- 17) ?x3)) 0))) (and (< (+ (+ (+ (* 51 ?x1) (* 5 ?x2)) (* (- 86) ?x3)) (* (- 33) ?x4)) (- 32)) (and (>= (+ (* 50 ?x1) (* (- 46) ?x4)) 37) (not (= (+ (* (- 95) ?x2) (* (- 96) ?x4)) (- 24)))))))))))) +(check-sat) +(exit) |