morphism graph: cycle detection: exclude trivial loop through Id Step
This commit is contained in:
parent
e2f7a363d7
commit
7f844f2a2d
1 changed files with 8 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue