Evaluation Automaton — Pattern Matching
Documentation status: architecture — see Maturity and evidence.
Pattern matching is a central expression-engine mechanism: it compares a value or structure with a pattern and can enrich the environment with new bindings.
The current engine provides a specialized protocol that associates evaluation functions with explicit matching states.
Conceptual model
value + pattern
-> compare structure
-> validate pattern constraints
-> create compatible bindings
-> success with enriched environment
OR explicit failure
Pattern categories
Depending on the expression family, a pattern can represent:
- an atomic value;
- a composite structure;
- a pattern variable;
- a wildcard;
- nested patterns.
Exact language syntax must be documented by the relevant language reference rather than inferred from matcher internals.
Why a specialized automaton?
Matching is more than a Boolean comparison. It may:
- produce bindings;
- fail without producing a business value;
- recurse into structures;
- return to a parent state;
- participate in logical or functional strategies.
It is therefore a natural bridge between functional evaluation and structural reasoning.