Skip to content

Commit

Permalink
Remove all traces of the old egraph
Browse files Browse the repository at this point in the history
  • Loading branch information
ninehusky committed Jul 19, 2024
1 parent 5cb38be commit 1eb4002
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/to_egraph_serialized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,14 @@ pub fn get_term(
let node = &choices[cid];
// add the node to the result egraph
if !result_egraph.nodes.contains_key(node) {
result_egraph.add_node(node.clone(), egraph.nodes[node].clone());
let mut new_node = egraph.nodes[node].clone();
new_node.children = egraph.nodes[node]
.children
.iter()
.map(|child| choices[egraph.nid_to_cid(&child)].clone())
.collect();

result_egraph.add_node(node.clone(), new_node);
}
}

Expand Down

0 comments on commit 1eb4002

Please sign in to comment.