Next: Searching commands
Up: Complete List of Maude
Previous: Rewriting commands
Contents
Matching commands
Matching commands are used to directly invoke the rewriting engine's
term pattern matcher. They can be useful for figuring out
exactly what subjects can be matched by a complex pattern.
- match
[ number ]
in module
:
pattern <=? subject-term
such that condition
.
- Performs straightforward matching in the given module. This kind of
matching is used by the engine for applying membership axioms. The result is a
list of at most number matching substitutions such that the subject term
matches the pattern and the substitution satisfies the optional condition
(whose syntactic form is the same as the one of conditions for conditional
equations and memberships; see Section 4.3).
If the upper bound clause is omitted, infinity is assumed.
For examples, see Section 4.9.
- xmatch
[ number ]
in module
:
pattern <=? subject-term
such that
condition
.
- Works similarly to the previous command, except that it performs matching with
extension for those theories that need it (those including the assoc or
iter attributes). If the subject term (after
theory normalization) has a symbol
from an extension theory on top, only a
piece of the top theory layer with
on top need be matched. This kind of
matching is used by the engine for applying equations and rules in order to
accurately simulate equivalence class rewriting. The result is a list of all
matches satisfying the given condition. If only part of the subject was
matched, that part is given.
For examples, see Sections 4.8 and 4.9.
Next: Searching commands
Up: Complete List of Maude
Previous: Rewriting commands
Contents
The Maude Team