summaryrefslogtreecommitdiff
path: root/test/regress/regress0/push-pop
diff options
context:
space:
mode:
Diffstat (limited to 'test/regress/regress0/push-pop')
-rw-r--r--test/regress/regress0/push-pop/Makefile.am7
-rw-r--r--test/regress/regress0/push-pop/quant-fun-proc-unfd.smt234
-rw-r--r--test/regress/regress0/push-pop/quant-fun-proc-unmacro.smt234
-rw-r--r--test/regress/regress0/push-pop/quant-fun-proc.smt230
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)
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback