Skip to main content

visit_unique

Function visit_unique 

Source
pub(crate) fn visit_unique(
    pending_bools: Vec<SymBoolExpr>,
    pending_words: Vec<SymExpr>,
    visitor: impl FnMut(&SymExpr) -> bool,
) -> bool
Expand description

Returns whether any word node reachable from the pending expressions satisfies visitor.

Expressions are hash-consed DAGs, so each distinct node is visited once. A tree walk would revisit shared subexpressions, which grows exponentially along chains such as nested hashes.