[][src]Function avalog::search

pub fn search<T, F, U>(
    start: &[T],
    pat: F,
    max_size: usize,
    filter: &[T],
    order_constraints: &[(T, T)],
    infer: fn(&HashSet<T, RandomState>, &HashSet<T, RandomState>, &[T]) -> Option<T>
) -> Result<Vec<U>, Vec<U>> where
    F: Fn(&T) -> Option<U>,
    T: Clone + PartialEq<T> + Eq + Hash

Searches for matches by a pattern.

  • pat specifies the map and acceptance criteria
  • max_size specifies the maximum size of proof

Returns Ok if all rules where exausted. Returns Err if the maximum size of proof was exceeded.