Equational logic as a programming language
Equational logic as a programming language
Implementation of an interpreter for abstract equations
Software—Practice & Experience
Compilers: principles, techniques, and tools
Compilers: principles, techniques, and tools
Compiling equational programs into efficient machine code
Compiling equational programs into efficient machine code
Left-to-right tree pattern matching
RTA-91 Proceedings of the 4th international conference on Rewriting techniques and applications
SIAM Journal on Computing
Journal of the ACM (JACM)
The Implementation of Functional Programming Languages (Prentice-Hall International Series in Computer Science)
Hi-index | 0.00 |
We propose a practical technique to compile pattern-matching of prioritised overlapping patterns in equational languages to an minimal deterministic left-to-right matching automaton. First, we present a method to construct a tree matching automaton for such patterns. The automaton obtained allows pattern-matching to be performed without any backtracking. Although this automaton is efficient since it avoids symbol re-examination, it can only achieve this at the cost of increased space requirements. Such space requirements could be minimised by using a dag automaton that shares all the isomorphic subautomata which are duplicated in a tree automaton. We design an efficient method to identify such subautomata and avoid their construction while generating the dag automaton. This is achieved without constructing the tree automaton first.