advancedresearch/avalog

Improve performance of ambiguity checking

Closed this issue · 0 comments

    let mut amb = false;
    for e in facts {
        if let AmbiguousRel(_, _, _) = e {
            amb = true; // <-- break out of the loop
        } else if let AmbiguousRole(_, _, _) = e {
            amb = true; // <-- break out of the loop
        }
    }
    let new_expr = Ambiguity(amb);
    if can_add(&new_expr) {return Some(new_expr)};