mirror of
https://github.com/Z3Prover/z3
synced 2025-04-12 20:18:18 +00:00
block recursive definitions with lambdas until they are properly supported #5813
This commit is contained in:
parent
1c10ce4070
commit
03ff3201b9
|
@ -225,6 +225,11 @@ namespace recfun {
|
||||||
m_vars.append(n_vars, vars);
|
m_vars.append(n_vars, vars);
|
||||||
m_rhs = rhs;
|
m_rhs = rhs;
|
||||||
|
|
||||||
|
if (!is_macro)
|
||||||
|
for (expr* e : subterms::all(m_rhs))
|
||||||
|
if (is_lambda(e))
|
||||||
|
throw default_exception("recursive definitions with lambdas are not supported");
|
||||||
|
|
||||||
expr_ref_vector conditions(m);
|
expr_ref_vector conditions(m);
|
||||||
|
|
||||||
// is the function a macro (unconditional body)?
|
// is the function a macro (unconditional body)?
|
||||||
|
@ -233,6 +238,8 @@ namespace recfun {
|
||||||
add_case(name, 0, conditions, rhs);
|
add_case(name, 0, conditions, rhs);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// analyze control flow of `rhs`, accumulating guards and
|
// analyze control flow of `rhs`, accumulating guards and
|
||||||
// rebuilding a `ite`-free RHS on the fly for each path in `rhs`.
|
// rebuilding a `ite`-free RHS on the fly for each path in `rhs`.
|
||||||
|
|
Loading…
Reference in a new issue