mirror of
https://github.com/Z3Prover/z3
synced 2026-05-17 15:39:27 +00:00
Prevent unsound solve-eqs elimination across recursive-function definitions (#9358)
* Initial plan * Prevent unsound solve-eqs elimination across recursive-function definitions Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/9a2fc92f-15e8-4806-988b-28bce96e8007 Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> * Update solve_eqs.cpp --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
abd378e9d8
commit
99f64b80fa
2 changed files with 23 additions and 1 deletions
|
|
@ -60,6 +60,20 @@ static void test_fp_to_real_denormal() {
|
|||
true);
|
||||
}
|
||||
|
||||
static void test_recfun_defined_function_soundness() {
|
||||
run_fp_test(
|
||||
"(set-option :model_validate true)\n"
|
||||
"(declare-fun fixedAdd () Int)\n"
|
||||
"(declare-fun variableAdd () Int)\n"
|
||||
"(define-fun-rec $$add$$ ((a Int) (b Int)) Int\n"
|
||||
" (ite (= 0 b) 2 (- a (+ 0 (- fixedAdd b)))))\n"
|
||||
"(assert (= fixedAdd (* 9 fixedAdd)))\n"
|
||||
"(assert (= 1 ($$add$$ 1 3)))\n"
|
||||
"(check-sat)\n",
|
||||
false);
|
||||
}
|
||||
|
||||
void tst_fpa() {
|
||||
test_fp_to_real_denormal();
|
||||
test_recfun_defined_function_soundness();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue