ML pattern match compilation and partial evaluation

25Citations
Citations of this article
9Readers
Mendeley users who have this article in their library.
Get full text

Abstract

We derive a compiler for ML-style pattern matches. It is conceptually simple and produces reasonably good compiled matches. The derivation is inspired by the instrumentation and partial evaluation of naive string matchers. Following that paradigm, we first present a general and naive ML pattern matcher, instrument it to collect and exploit extra information, and show that partial evaluation of the instrumented general matcher with respect to a given match produces an efficient specialized matcher. We then discard the partial evaluator and show that a match compiler can be obtained just by slightly modifying the instrumented general matcher. The resulting match compiler is interesting in its own rightl and naturally detects inexhaustive matches and redundant match rules.

Cite

CITATION STYLE

APA

Sestoft, P. (1996). ML pattern match compilation and partial evaluation. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 1110, pp. 446–464). Springer Verlag. https://doi.org/10.1007/3-540-61580-6_22

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free