diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2020-06-18 22:51:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-18 22:51:50 -0700 |
commit | e8884b9b8ba86ce71807887cab87a5188cce4003 (patch) | |
tree | 3b56553ecc3227eafe7aca057c5e29cd8efb63e0 /test/regress/regress0 | |
parent | 3054cd99db968eb85a9195b12e17e83a334e00cb (diff) |
Add logic check for define-fun(s)-rec (#4577)
This commit adds a logic check for `define-fun-rec`/`define-funs-rec` at
the level of the new API that checks whether the logic is quantified and
includes UF. To make sure that the parser actually executes that check,
this commit converts the `DefineFunctionRecCommand` command to use the
new API instead of the old one. This temporarily breaks the `exportTo`
functionality for `DefineFunctionRecCommand` but this is not currently
used within the CVC4 code base (and it seems unlikely that users use
commands).
Diffstat (limited to 'test/regress/regress0')
-rw-r--r-- | test/regress/regress0/smtlib/define-fun-rec-logic.smt2 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/regress/regress0/smtlib/define-fun-rec-logic.smt2 b/test/regress/regress0/smtlib/define-fun-rec-logic.smt2 new file mode 100644 index 000000000..1af16210d --- /dev/null +++ b/test/regress/regress0/smtlib/define-fun-rec-logic.smt2 @@ -0,0 +1,12 @@ +; EXPECT: unsat +; EXPECT: (error "recursive function definitions require a logic with quantifiers") +; EXIT: 1 +(set-logic UFBV) +(define-funs-rec ((f ((b Bool)) Bool) (g ((b Bool)) Bool)) (b b)) +(assert (g false)) +(check-sat) +(reset) +(set-logic QF_BV) +(define-funs-rec ((f ((b Bool)) Bool) (g ((b Bool)) Bool)) (b b)) +(assert (g false)) +(check-sat) |