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)
| 522 | /// This creates a simple linear conflict tree. More sophisticated |
| 523 | /// conflict detection (order conflicts) would enhance this. |
| 524 | fn build_conflict_tree(graph: &AliveGraph, result: &mut OrderResult) { |
| 525 | let mut path = ConflictPath::new(); |
| 526 | |
| 527 | // Add SCCs in reverse order (they come out in reverse topological order) |
| 528 | for (i, scc) in result.sccs.iter().enumerate().rev() { |
| 529 | let scc_id = SccId::new(i); |
| 530 | |
| 531 | // For multi-span SCCs, we could create nested conflict structures |
| 532 | // For now, just add them as SCCs |
| 533 | path.push(PathElement::scc(scc_id)); |
| 534 | |
| 535 | // Track if any span in this SCC is a zombie |
| 536 | let _has_zombie = scc.iter().any(|&vid| { |
| 537 | graph |
| 538 | .try_get_vertex(vid) |
| 539 | .map(|v| v.is_zombie()) |
| 540 | .unwrap_or(false) |
| 541 | }); |
| 542 | } |
| 543 | |
| 544 | result.conflict_tree = ConflictTree::from_path(path); |
| 545 | } |
| 546 | |
| 547 | // TESTS |
| 548 |
no test coverage detected