String Pattern-Matching in Prolog

Abstract A pattern-matching feature for the Prolog language is described. Through the use of patterns, introduced as Prolog predicates, the feature favors the specification of string handling algorithms in a declarative style. A number of convenient pre-defined patterns, adapted from SNOBOL 4, are included. The use of two-level grammars as a paradigm for developing Prolog programs incorporating the pattern-matching feature is also discussed.

[1]  Alfred V. Aho,et al.  The Theory of Parsing, Translation, and Compiling , 1972 .

[2]  Ralph E. Griswold,et al.  The SNOBOL4 programming language , 1968 .

[3]  Bijan Arbab Compiling Circular Attribute Grammars Into Prolog , 1986, IBM J. Res. Dev..

[4]  Friedrich L. Bauer,et al.  Revised report on the algorithm language ALGOL 60 , 1963, CACM.

[5]  Frank G. Pagan,et al.  Formal Specification of Programming Languages: A Panoramic Primer , 1981 .

[6]  Jacques Cohen,et al.  Parsing and compiling using Prolog , 1987, TOPL.

[7]  Robert A. Kowalski,et al.  Logic for problem solving , 1982, The computer science library : Artificial intelligence series.

[8]  Keith L. Clark,et al.  Micro-Prolog - programming in logic , 1984, Prentice Hall international series in computer science.

[9]  Adrian Walker Knowledge systems and PROLOG , 1987 .

[10]  Antonio L. Furtado,et al.  A Grammatical Approach to Data Bases , 1983, IFIP Congress.

[11]  Alain Colmerauer,et al.  Metamorphosis Grammars , 1978, Natural Language Communication with Computers.

[12]  Ralph E. Griswold,et al.  The Icon programming language , 1983 .

[13]  J. E. L. Peck,et al.  Two-Level Grammars in Action , 1974, IFIP Congress.

[14]  Jan Maluszynski,et al.  Relating Logic Programs and Attribute Grammars , 1985, J. Log. Program..

[15]  Gaston H. Gonnet,et al.  A constructive approach to the design of algorithms and their data structures , 1983, CACM.