Abstract
Pattern matching, if understood in a broad enough sense, includes a variety of operations, from simple pattern matching operations implemented in a number of programming languages to matching a frame pattern to a frame example, which underlies some knowledge representation systems in artificial intelligence. In this paper, a mathematical language is presented that is based on the concepts of category theory and allows one to formally describe various types of pattern matching from a unified point of view. A typical example of a pattern is given by an expression containing variables that can be substituted by other expressions. The category-theoretical description of such patterns presented in the paper is close to the Kleisli construction, which is often used for the formalization of a substitution of expressions for variables. However, the category presented in the paper is not the dual of the Kleisli category, and each pattern in it is assigned a morphism; this allows one to more clearly describe the idea of matching. In particular, the language proposed allows one to describe rules based on pattern matching. Such rules are often used in computer systems.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.