Pattern matching is a key concept for rule-based expert systems. Simple pattern interpreters appear in nearly every book on Lisp. Pattern matching is also a useful tool for case analyses as provided by functional languages such as ML or Miranda™. These two uses are somewhat different since functional languages emphasize a discrimination based on types while Lisp, or Plasma, make use of S-expressions or segments of S-expressions within patterns. The paper presents an intermediate language for patterns and its denotational semantics. This reduced language is powerful enough to express boolean composition of patterns as well as segment handling and unbounded pattern repetition. A compiler is then defined which translates patterns into functional code. We discuss some compilation variant as well as the integration of the pattern sub-language into Lisp. These capabilities make pattern matching an useful and efficient tool for a wide class of applicative languages and allow to incorporate into patterns more knowledge about the form or gestalt of the data to be matched.
CITATION STYLE
Queinnec, C. (1990). Compilation of non-linear, second order patterns on s-expressions. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 456 LNCS, pp. 340–357). Springer Verlag. https://doi.org/10.1007/bfb0024194
Mendeley helps you to discover research relevant for your work.