class

PatternMatching::PatternMatcher

Inherits Reference < Object

Main pattern matching engine with enhanced backtracking

Constructors

new(atomspace : AtomSpace::AtomSpace, max_results : Int32 = 1000, timeout_seconds : Int32 | Nil = nil)

Instance methods

atomspace
find_variable_candidates(variable : AtomSpace::Atom, pattern : Pattern) : Array(AtomSpace::Atom)

Find all atoms that could bind to a variable given constraints

match(pattern : Pattern) : Array(MatchResult)

Enhanced find all matches for a given pattern with backtracking

match_one(template : AtomSpace::Atom) : MatchResult | Nil

Match a single pattern template and return the first result