This Article 
   
 Share 
   
 Bibliographic References 
   
 Add to: 
 
Digg
Furl
Spurl
Blink
Simpy
Google
Del.icio.us
Y!MyWeb
 
 Search 
   
An Efficient Implementation of Static String Pattern Matching Machines
August 1989 (vol. 15 no. 8)
pp. 1010-1016

A technique for implementing a static transition table of a string pattern matching machine which locates all occurrences of a finite number of keywords in a string is described. The approach is based on S.C. Johnson's (1975) storage and retrieval method of the transition table of a finite-state machine. By restricting the transition table of the finite-state machine to that of the string pattern-matching machine, triple arrays of Johnsons's data structure can be reduced to two arrays. The retrieval program of the reduced data structure can be speeded up by a finite straight program without loops.

[1] A. V. Aho, R. Sethi, and J. D. Ullman,Compilers: Principles, Techniques, and Tools. Reading, MA: Addison-Wesley, 1986.
[2] A. V. Aho and M. J. Corasick, "Efficient string matching: An aid to bibliographic search,"Commun. ACM, pp. 333-340, June 1975.
[3] J. Aoe, Y. Yamamoto, and R. Shimada, "A method for speeding up LR(k) parsers using action patterns" (in Japanese),IECE Trans., vol. J64-D, pp. 940-946, Oct. 1981: (in English)Scripta Electronica Japonica, vol. 12, no. 5.
[4] J. Aoe, Y. Yamamoto, and R. Shimada, "A method for improving string pattern matching machines" (in Japanese),IECE Trans., vol. J65-D, pp. 989-996, Aug. 1982: (in English)Scripta Electronica Japonica, vol. 13, no. 4.
[5] J. Aoe, Y. Yamamoto, and R. Shimada, "An efficient method for storing and retrieving finite state machines" (in Japanese),IECE Trans., vol. J65-D, pp. 1235-1242, Oct. 1982; (in English)Scripta Electronica Japonica, vol. 13, no. 5.
[6] J. Aoe, Y. Yamamoto, and R. Shimada, "A method for improving string pattern matching machines,"IEEE Trans. Software Eng., vol. SE-10, pp. 116-120, Jan. 1984.
[7] J. Aoe, Y. Yamamoto, and R. Shimada, "A practical method for reducing weak precedence parsers,"IEEE Trans. Software Eng., vol. SE-9, pp. 25-30, Jan. 1983.
[8] J. Aoe, Y. Yamamoto, and R. Shimada, "A practical method for reducing sparse matrices with invariant entries,"Int. J. Comput. Math., vol. 12, pp. 97-111, Nov. 1982.
[9] J. Aoe, Y. Yamamoto, and R. Shimada, "An efficient algorithm of reducing sparse matrices by row displacements" (in Japanese),Trans. Inform. Soc. Japan, vol. 26, pp. 211-218, Mar. 1985.
[10] R. G. G. Cattel, "Automatic derivation of code generators from machine descriptions,"ACM Trans. Program. Lang. Syst., vol. 4, pp. 173-190, Jan. 1982.
[11] R. Cichelli, "Minimal Perfect Hash Functions Made Simple,"Comm. ACM, Vol. 23, No. 1, Jan. 1980, pp. 17-19.
[12] J. W. Davidson and C. W. Fraser, "The design and application of a retargetble peephole optimizer,"ACM Trans. Program. Lang. Syst., vol. 4, pp. 21-36, Jan. 1982.
[13] S. L. Graham, "Table-driven code generation,"Computer, vol. 13, pp. 25-34, Aug. 1980.
[14] J. Harada, "Pascal compiler by table driven lexical and syntax analyzers" (in Japanese), Graduation thesis, Tokushina Univ., 1983.
[15] S. C. Johnson, "YACC-yet another compiler-compiler," Bell Lab., NJ, Rep. CSTR-32, pp. 1-34, 1975.
[16] D. E. Knuth, J. H. Morris, and V. R. Pratt, "Fast pattern matching in string,"SIAM J. Comput., vol. 6, pp. 323-350, June 1977.
[17] M. E. Lesk, "Lex--A lexical analyzer generator," CSTR 39, Bell Lab,, NJ, Rep. CSTR 39, pp. 1-13, Oct. 1975.
[18] J. L. Peterson, "Computer programs for spelling correction: An experiment in program design," inLecture Notes in Computer Science 96. New York: Springer-Verlag, 1980.
[19] R. Sprugnoli, "Perfect Hashing Functions: A Single Probe Retrieving Method for Static Sets,"Comm. ACM, Vol. 20, No. 11, Nov. 1977, pp. 841-850.
[20] A. S. Tanenbaum, H. Staveren, and J. W. Stevenson, "Using peephole optimization on intermediate code,"ACM Trans. Program. Lang. Syst., vol. 4, pp. 21-36, Jan. 1982.
[21] R. E. Tarjan and A. C. Yao, "Storing a sparse table,"Commun. ACM, vol. 22, pp. 606-611, Nov. 1979.
[22] A. Tsuji, "Japanese to English machine translation," Master's thesis, Tokushima Univ., 1986.
[23] N. Wirth, "The programming language Pascal,"Acta Inform., vol. 1, pp. 35-63, Jan. 1971.

Index Terms:
implementation technique; keyword location; static string pattern matching machines; transition table; finite-state machine; triple arrays; Johnsons's data structure; retrieval program; reduced data structure; finite straight program; data structures; information retrieval; subroutines
Citation:
J.I. Aoe, "An Efficient Implementation of Static String Pattern Matching Machines," IEEE Transactions on Software Engineering, vol. 15, no. 8, pp. 1010-1016, Aug. 1989, doi:10.1109/32.31357
Usage of this product signifies your acceptance of the Terms of Use.