Abstract
Pattern matching is a fundamental feature in many applications such as functional programming, logic programming, theorem proving, term rewriting and rule-based expert systems. Usually, patterns size is not constrained and ambiguous patterns are allowed. This generality leads to a clear and concise programming style. However, it yields challenging problems in compiling of such programming languages. Generally, patterns are pre-processed into a deterministic finite automaton. With ambiguous or overlapping patterns a subject term may be an instance of more than one pattern. In this case, pattern matching order in lazy evaluation affects the size of the matching automaton and the matching time. Furthermore, it may even affect the termination properties of term evaluations. In this paper, we engineer good traversal orders that allow one to design an efficient adaptive pattern-matchers that visit necessary positions only. We do so using genetic programming to evolve the most adequate traversal order given the set of allowed patterns. Hence, we improve time and space requirements of pattern-matching as well as termination properties of term evaluation
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.