morphism graph: cycle detection: exclude trivial loop through Id Step

This commit is contained in:
Michael Sippel 2025-06-13 17:37:37 +02:00
parent e2f7a363d7
commit 7f844f2a2d
Signed by: senvas
GPG key ID: F96CF119C34B64A6

View file

@ -133,16 +133,20 @@ impl<M: Morphism+Clone> SearchNodeExt<M> for Arc<RwLock<SearchNode<M>>> {
}
fn creates_loop(&self) -> bool {
/*
let mut cur_node = self.read().unwrap().pred.clone();
while let Some(n) = cur_node {
if n.get_type().dst_type == self.get_type().dst_type {
return true;
let s = &n.read().unwrap().step;
match s {
Step::Id { τ } => {}
_ => {
if n.get_type().src_type == self.get_type().dst_type {
return true;
}
}
}
cur_node = n.read().unwrap().pred.clone();
}
*/
false
}