Skip to content

Commit

Permalink
Ignored children aren't reachable
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Fischman committed Apr 13, 2024
1 parent 96551dd commit 1d1deeb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dag_in_context/src/greedy_dag_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,12 @@ pub fn extract(
continue;
}
// Add the children to the frontier
for child in &egraph.nodes.get(&nid).unwrap().children {
frontier.push_back(child.clone());
let node = egraph.nodes.get(&nid).unwrap();
let ignored_children = cm.ignored_children(&node.op);
for (i, child) in node.children.iter().enumerate() {
if !ignored_children.contains(&i) {
frontier.push_back(child.clone());
}
}
}
// Get unreachable nodes with set complement
Expand Down

0 comments on commit 1d1deeb

Please sign in to comment.