Build the conflict tree from SCCs. This creates a simple linear conflict tree. More sophisticated conflict detection (order conflicts) would enhance this.
(graph: &AliveGraph, result: &mut OrderResult)
| 632 | /// This creates a simple linear conflict tree. More sophisticated |
| 633 | /// conflict detection (order conflicts) would enhance this. |
| 634 | fn build_conflict_tree(graph: &AliveGraph, result: &mut OrderResult) { |
| 635 | let mut path = ConflictPath::new(); |
| 636 | |
| 637 | // Add SCCs in reverse order (they come out in reverse topological order) |
| 638 | for (i, scc) in result.sccs.iter().enumerate().rev() { |
| 639 | let scc_id = SccId::new(i); |
| 640 | |
| 641 | // For multi-span SCCs, we could create nested conflict structures |
| 642 | // For now, just add them as SCCs |
| 643 | path.push(PathElement::scc(scc_id)); |
| 644 | |
| 645 | // Track if any span in this SCC is a zombie |
| 646 | let _has_zombie = scc.iter().any(|&vid| { |
| 647 | graph |
| 648 | .try_get_vertex(vid) |
| 649 | .map(|v| v.is_zombie()) |
| 650 | .unwrap_or(false) |
| 651 | }); |
| 652 | } |
| 653 | |
| 654 | result.conflict_tree = ConflictTree::from_path(path); |
| 655 | } |
| 656 | |
| 657 | // TESTS |
| 658 |
no test coverage detected