Skip to content

Commit fca44ff

Browse files
fix #4394
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 72d129e commit fca44ff

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/ast/recfun_decl_plugin.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -355,11 +355,7 @@ namespace recfun {
355355
util & u;
356356
find(util & u) : u(u) {}
357357
bool operator()(expr * e) override {
358-
//return is_app(e) ? u.owns_app(to_app(e)) : false;
359-
if (! is_app(e)) return false;
360-
361-
app * a = to_app(e);
362-
return u.is_defined(a);
358+
return is_app(e) && u.is_defined(to_app(e));
363359
}
364360
};
365361
find f(u);
@@ -467,6 +463,8 @@ namespace recfun {
467463
scores.insert(e, 0);
468464
// walk deepest terms first.
469465
for (unsigned i = max_depth; i > 0; --i) {
466+
if (!by_depth.contains(i))
467+
continue;
470468
for (expr* t : by_depth[i]) {
471469
unsigned score = 0;
472470
for (expr* parent : parents[t]) {

0 commit comments

Comments
 (0)