Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Open access

An Alternative to the Use of Patterns in String Processing

Published: 01 April 1980 Publication History
  • Get Citation Alerts
  • Abstract

    SNOBOL4 is best known for its string processing facilities, which are based on patterns as data objects. Despite the demonstrated success of patterns, there are many shortcomings associated with their use. The concept of patterns in SNOBOL4 is examined and problem areas are discussed. An alternative method for high-level string processing is described. This method, implemented in the programming language Icon, employs generators, which are capable of producing alternative values. Generators, coupled with a goal-driven method of expression evaluation, provide the string processing facilities of SNOBOL4 without the disadvantages associated with patterns. Comparisons between SNOBOL4 and Icon are included and the broader implications of the new approach are discussed.

    References

    [1]
    ATKINSON, R. Toward more general iteration methods in CLU. CLU Design Note 54, M.I.T., Cambridge, Mass., Sept. 1975.
    [2]
    BOBROW, D.G., AND RAPHAEL, B. New programming languages for artificial intelligence research. Comput. Surv. 6, 3 (Sept. 1974), 153-174.
    [3]
    BOYER, R.S., ANO MOORE, J.S. A fast string searching algorithm. Comrnun. ACM 20, 10 (Oct. 1977), 762-772.
    [4]
    DEWAR, R.B.K. SPITBOL version 2.0. SNOBOL4 Proj. Doc. S4D23, Illinois Inst. Technology, Chicago, 1971.
    [5]
    DEWAR, R.B.K., AND MCCANN, A.P. MACRO SPiTBOL--A SNOBOL4 compiler. Softw., Pract. Exper. 7, I (Jan.-Feb. 1977), 95-114.
    [6]
    DOYLE, J.N. A generalized facility for the analysis and synthesis of strings and a procedurebased model of an implementation. M.S. thesis, Univ. Arizona, Tucson, 1975.
    [7]
    FLECK, A.C. Formal models for string patterns. In Current Trends in Programming Methodology, vol. IV, Data Structuring, R. T. Yeh, Ed. Prentice-Hall, Englewood Cliffs, N.J., 1978, pp. 216-240.
    [8]
    FRASER, C.W. A compact, machine-independent peephole optimizer. In Conf. Rec. 6th Annu. ACM Symp. Principles Programming Languages, Jan. 1979, pp. 1-6.
    [9]
    GIMPEL, J.F. Algorithms in SNOBOL4. Wiley, New York, 1976.
    [10]
    GIMPEL, J.F. A theory of discrete patterns and their implementation in SNOBOLA. Commun. ACM 16, 2 (Feb. 1973), 91-100.
    [11]
    GiMPEL, J.F. Nonlinear pattern theory. Acta Inf. 4, (1975), 91-100.
    [12]
    GRmWOLD, R.E. Extensible pattern matching in SNOBOL4. In Proc. ACM Annu. Conf., Oct. 1975, pp. 248-252.
    [13]
    GRmWOLD, R.E. String analysis and synthesis in SL5. In Proc. ACM Annu. Conf., Oct. 1976, pp. 410-414.
    [14]
    GRISWOLD, R.E. String and List Processing in SNOBOL4, Techniques and Applications. Prentice-Hall, Englewood Cliffs, N.J., 1975, pp. 12, 233-234.
    [15]
    GRISWOLD, R.E. The Macro Implementation of SNOBOL4, A Case Study in Machine-Independent Software Development. W. H. Freeman, San Francisco, 1972.
    [16]
    GRmWOLD, R.E. The use of character sets and character mappings in Icon. Comput. J., to appear.
    [17]
    GRISWOLD, R.E., AND HANSON, D.R. An overview of SL5. SIGPLAN Notices 12, 5 (Apr. 1977), 4O-50.
    [18]
    GRISWOLD, R.E., AND HANSON, D.R. Reference manual for the Icon programming language. Tech. Rep. TR 79-1, Dep. Comput. Sci., Univ. Arizona, Tucson, Jan. 1979.
    [19]
    GRISWOLD, R.E., HANSON, D.R., AND KORB, J.T. Generators in Icon. ACM Trans. Program. Lang., submitted for publication.
    [20]
    GRISWOLD, R.E., HANSON, D.R., AND KORB, J.T. The Icon programming language: An overview. SIGPLAN Notices 14, 4 (April 1979), 18-31.
    [21]
    GRmWOLD, R.E., POACS, J.F., AND POLONSKY, I.P. The SNOBOL4 Programming Language, 2nd ed. Prentice-Hall, Englewood Cliffs, N.J., 1971.
    [22]
    HANSON, D.R., AND GRISWOLD, R.E. The SL5 procedure mechanism. Commun. ACM 21, 5 (May 1978), 392-400.
    [23]
    KNUTH, D.E., MORRIS, J.H., AND PRATT, V.R. Fast pattern matching in strings. SIAM J. Comput. 6, 2 (June 1977), 323-350.
    [24]
    KORB, J.T. The design and implementation of a goal-directed programming language. Ph.D. dissertation, Univ. Arizona, Tucson, 1979.
    [25]
    LlsKOV, B.H., ST AL. Abstraction mechanisms in CLU. Commun. A CM 20, 8 (Aug. 1977), 564-576.
    [26]
    NEWELL, A., ED. Information Processing Language-V Manual (Rand Corp.), Prentice-Hall, Englewood Cliffs, N.J., 1961.
    [27]
    PFEFrER, A.S., AND FURTADO, A.L. Pattern matching for structured programming. In Proc. 7th Asilomar Conf. Circuits, Systems, and Computers, Pacific Grove, Calif., 1973, pp. 466-469.
    [28]
    Proceedings of the workshop on pattern-directed inference systems. SIGART Newsletter 63 (June 1977), 1-84.
    [29]
    SHAW, M., WULF, W.A., AND LONDON, R.L. Abstraction and verification in Alphard: Defining and specifying iteration and generators. Commun. ACM 20, 8 (Aug. 1977), 553-564.
    [30]
    STEWART, G.F. An algebraic model for string patterns. In Conf. Rec. 2nd Annu. ACM Symp. Principles of Programming Languages, Jan. 1975, pp. 167-184.
    [31]
    SUSSMAN, G.J., ANO McDERMOtt, D.V. From PLANNER to CONNIVER--A genetic approach. Proc. 1972 AFIPS, Fall Jt. Computer Conf., vol. 41, AFIPS Press, Arlington, Va., pp. 1171-1179.
    [32]
    TESLER, L.G., ENEA, H.J., AND SMXTH, D.C. The LISP70 pattern matching system. In Proc. 3rd Int. Jt. Conf. Artificial Intelligence, Stanford, Calif., 1973, pp. 671-676.
    [33]
    VA~ WIJ~GAAROE~, A., ET AL. Revised report on the algorithmic language Algol 68. Acta Inf. 5 (Jan. 1976), 1-236.
    [34]
    WVLF, W., A~o SHAW, M. Global variables considered harmful. SIGPLAN Notices 8, (Feb. 1973), 28-34.

    Cited By

    View all

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Transactions on Programming Languages and Systems
    ACM Transactions on Programming Languages and Systems  Volume 2, Issue 2
    April 1980
    126 pages
    ISSN:0164-0925
    EISSN:1558-4593
    DOI:10.1145/357094
    Issue’s Table of Contents

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 01 April 1980
    Published in TOPLAS Volume 2, Issue 2

    Permissions

    Request permissions for this article.

    Check for updates

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)34
    • Downloads (Last 6 weeks)6

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Get Access

    Login options

    Full Access

    Media

    Figures

    Other

    Tables

    Share

    Share

    Share this Publication link

    Share on social media