Skip to content

Commit

Permalink
block recursive definitions with lambdas until they are properly supp…
Browse files Browse the repository at this point in the history
…orted #5813
  • Loading branch information
NikolajBjorner committed Feb 6, 2022
1 parent 1c10ce4 commit 03ff320
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/ast/recfun_decl_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,11 @@ namespace recfun {
m_vars.append(n_vars, vars);
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);

// is the function a macro (unconditional body)?
Expand All @@ -233,6 +238,8 @@ namespace recfun {
add_case(name, 0, conditions, rhs);
return;
}



// analyze control flow of `rhs`, accumulating guards and
// rebuilding a `ite`-free RHS on the fly for each path in `rhs`.
Expand Down

0 comments on commit 03ff320

Please sign in to comment.