Efficient automata-driven pattern-matching for equational programs

Citation
N. Nedjah et al., Efficient automata-driven pattern-matching for equational programs, SOFTW PR EX, 29(9), 1999, pp. 793-813
Citations number
29
Categorie Soggetti
Computer Science & Engineering
Journal title
SOFTWARE-PRACTICE & EXPERIENCE
ISSN journal
00380644 → ACNP
Volume
29
Issue
9
Year of publication
1999
Pages
793 - 813
Database
ISI
SICI code
0038-0644(19990725)29:9<793:EAPFEP>2.0.ZU;2-K
Abstract
We propose a practical technique to compile left-to-right pattern-matching of prioritised overlapping function definitions in equational languages to a matching automaton from which efficient code can be derived. First, a mat ching table is constructed using a compilation method similar to the techni que that YACC employs to generate parsing tables. The matching table obtain ed allows for the pattern-matching process to be performed without any back tracking. Then, the known information about right sides of the equations is inserted in the matching table in order to speed-up the pattern-matching p rocess. Most of the discussion assumes that the processed pattern set is le ft-linear, the non-linear case being handled by an additional pass followin g the matching stage. Copyright (C) 1999 John Wiley & Sons, Ltd.