The match engine
The engine is the mutable driver behind every match function — most users never touch it. Reuse it via reset! when matching the same pattern against many subjects, or drive it manually via next_match! for custom enumeration.
MatchMaker.MatchEngine — Type
MatchEngineA defunctionalized backtracking machine: drives a Matcher against a subject by advancing MatchFrames via step! — see next_match! and reset!.
MatchMaker.next_match! — Function
next_match!(eng::MatchEngine) -> Bool
Advance eng to the next complete alternative. Returns false when the search space is exhausted. A complete match leaves bindings on the trail; the frames stay live so a further call resumes enumeration.
MatchMaker.reset! — Function
reset!(
eng::MatchEngine,
subj::IRStructure{SymReal},
sroot::Int32
) -> MatchEngine
Rebind eng to a new site (subj/sroot) for a fresh search: release live frames to the pool, unwind all bindings, and re-push the root frame. Buffers keep their capacity — this is the per-site reset path of RuleWorkspace (REWRITING.md §4).
MatchMaker.step! — Function
step!(
eng::MatchEngine,
f::MatchFrame
) -> MatchMaker.FrameStatus.T
Advance frame f to its next alternative — the engine's dispatch seam, called by next_match!. See FrameStatus for the return contract.
MatchMaker.MatchFrame — Type
MatchFrameA match frame — the union of the concrete per-variant structs. step! dispatches on the concrete type directly.
MatchMaker.FrameStatus — Module
FrameStatusResult of one step! call on a MatchFrame: Produced (one complete alternative, frame stays live for more), Matched (obligation satisfied, no resumable alternatives), Failed (exhausted).