diff options
author | ajreynol <andrew.j.reynolds@gmail.com> | 2015-08-01 01:31:07 +0200 |
---|---|---|
committer | ajreynol <andrew.j.reynolds@gmail.com> | 2015-08-01 01:31:07 +0200 |
commit | 91f40dee752910fca5d749656c0b6ee1bc1281aa (patch) | |
tree | 4db131923ceabe2fff9f408fc39032bac973e399 /test | |
parent | bf7f7d6960f6e03e90880dd3da9ff1bf00943cf3 (diff) |
Make --fmf-fun and --macros-quant work in incremental mode. Add regressions.
Diffstat (limited to 'test')
4 files changed, 103 insertions, 2 deletions
diff --git a/test/regress/regress0/push-pop/Makefile.am b/test/regress/regress0/push-pop/Makefile.am index 29ad34255..59531ce8a 100644 --- a/test/regress/regress0/push-pop/Makefile.am +++ b/test/regress/regress0/push-pop/Makefile.am @@ -29,14 +29,17 @@ CVC_TESTS = \ incremental-subst-bug.cvc SMT2_TESTS = \ - tiny_bug.smt2 + tiny_bug.smt2 BUG_TESTS = \ bug216.smt2 \ bug233.cvc \ bug326.smt2 \ arith_lra_01.smt2 \ - arith_lra_02.smt2 + arith_lra_02.smt2 \ + quant-fun-proc.smt2 \ + quant-fun-proc-unmacro.smt2 \ + quant-fun-proc-unfd.smt2 TESTS = $(SMT_TESTS) $(SMT2_TESTS) $(CVC_TESTS) $(BUG_TESTS) diff --git a/test/regress/regress0/push-pop/quant-fun-proc-unfd.smt2 b/test/regress/regress0/push-pop/quant-fun-proc-unfd.smt2 new file mode 100644 index 000000000..f16c6fb90 --- /dev/null +++ b/test/regress/regress0/push-pop/quant-fun-proc-unfd.smt2 @@ -0,0 +1,34 @@ +; COMMAND-LINE: --incremental --fmf-fun --macros-quant --no-check-models +(set-logic UFLIA) + + +(define-fun f ((x Int)) Int x) + +(declare-fun h (Int) Int) +(assert (forall ((x Int)) (= (h x) 0))) + +; EXPECT: sat +(push 1) +(define-fun-rec g ((x Int)) Int (ite (<= x 0) 0 (+ (g x) x))) +(check-sat) +(pop 1) + +(declare-fun g (Int) Int) + +; EXPECT: unsat +(push 1) +(assert (= (f 1) 2)) +(check-sat) +(pop 1) + +; EXPECT: sat +(push 1) +(assert (= (g 1) 5)) +(check-sat) +(pop 1) + +; EXPECT: unsat +(push 1) +(assert (= (h 1) 5)) +(check-sat) +(pop 1) diff --git a/test/regress/regress0/push-pop/quant-fun-proc-unmacro.smt2 b/test/regress/regress0/push-pop/quant-fun-proc-unmacro.smt2 new file mode 100644 index 000000000..7cacfca98 --- /dev/null +++ b/test/regress/regress0/push-pop/quant-fun-proc-unmacro.smt2 @@ -0,0 +1,34 @@ +; COMMAND-LINE: --incremental --fmf-fun --macros-quant --no-check-models +(set-logic UFLIA) + + +(define-fun f ((x Int)) Int x) + +(define-fun-rec g ((x Int)) Int (ite (<= x 0) 0 (+ (g x) x))) + +; EXPECT: sat +(declare-fun h (Int) Int) +(push 1) +(assert (forall ((x Int)) (= (h x) 0))) +(check-sat) +(pop 1) + + +; EXPECT: unsat +(push 1) +(assert (= (f 1) 2)) +(check-sat) +(pop 1) + +; EXPECT: unsat +(push 1) +(assert (= (g 1) 5)) +(check-sat) +(pop 1) + +; EXPECT: sat +(push 1) +(assert (= (h 1) 5)) +(check-sat) +(pop 1) + diff --git a/test/regress/regress0/push-pop/quant-fun-proc.smt2 b/test/regress/regress0/push-pop/quant-fun-proc.smt2 new file mode 100644 index 000000000..8f4758df6 --- /dev/null +++ b/test/regress/regress0/push-pop/quant-fun-proc.smt2 @@ -0,0 +1,30 @@ +; COMMAND-LINE: --incremental --fmf-fun --macros-quant --no-check-models +(set-logic UFLIA) + +(define-fun f ((x Int)) Int x) + +(define-fun-rec g ((x Int)) Int (ite (<= x 0) 0 (+ (g x) x))) + +(declare-fun h (Int) Int) +(assert (forall ((x Int)) (= (h x) (+ x 3)))) + +; EXPECT: sat +(check-sat) + +; EXPECT: unsat +(push 1) +(assert (= (f 1) 2)) +(check-sat) +(pop 1) + +; EXPECT: unsat +(push 1) +(assert (= (g 1) 5)) +(check-sat) +(pop 1) + +; EXPECT: unsat +(push 1) +(assert (= (h 1) 5)) +(check-sat) +(pop 1) |