Skip to content

Commit

Permalink
Fix missing const equality in some cases (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasAlaif authored Dec 17, 2024
1 parent fa92ce2 commit 47a1928
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,13 @@ impl MlExplainer {
self.ancestor_is_recurring = false;
}
self.ancestor_is_recurring = ancestor_is_recurring;
if self.ancestor_is_recurring && !self.add_mode {
self.burned_eqs.insert(eq);
self.add_mode = true;
self.super_walk_trans(eq, forward)?;
self.add_mode = false;
assert!(self.ancestor_is_recurring);
}
Ok(())
}
fn walk_trans(
Expand Down Expand Up @@ -464,15 +471,7 @@ impl MlExplainer {
return Ok(());
}

self.super_walk_trans(eq, forward)?;
if self.ancestor_is_recurring {
self.burned_eqs.insert(eq);
self.add_mode = true;
self.super_walk_trans(eq, forward)?;
self.add_mode = false;
assert!(self.ancestor_is_recurring);
}
Ok(())
self.super_walk_trans(eq, forward)
}
}
let mut walker = TransEqGraphWalker {
Expand Down

0 comments on commit 47a1928

Please sign in to comment.