A study in string processing languages (Q1075751)

From MaRDI portal





scientific article; zbMATH DE number 3951979
Language Label Description Also known as
English
A study in string processing languages
scientific article; zbMATH DE number 3951979

    Statements

    A study in string processing languages (English)
    0 references
    0 references
    1985
    0 references
    String processing refers to the process of inspecting, modifying and transforming strings in various contexts, such as text editing, or compiling a source program into a string of machine code. The string processing features of so-called universal languages are rather poor: for example, they generally lack backtracking mechanisms which are needed for efficient realization of pattern matching, and they usually only allow strings whose (maximal) size is known at compile time. Therefore special purpose languages for string processing have been developed, among which only SNOBOL4 has gained a certain popularity. In the book under review, another string processing language named SUMMER is proposed; it has been developed by the author at the Centre for Mathematics and Computer Science at Amsterdam. As the title suggests, the book is not only a language report; the language definition proper is only a part of it. In the first part, the author deals with the main concepts and characteristics of SUMMER as a string processing language, which are compared with the concepts used in SNOBOL4. As pattern matching is the central function in string processing, there is a broad discussion about the respective backtracking mechanisms in both languages. The immediate/conditional model of SNOBOL, which can lead to ugly, unreadable programs bearing the danger of awful, unpredictable side effects is set against SUMMER's Recovery Model, where backtracking can be controlled by the programmer by means of a TRY-statement which helps in avoiding side effects. A possibility for an efficient implementation of this model (the Recovery Cache) is also presented. Two more advantages of SUMMER should be mentioned: first, SNOBOL's drawback of different notations for pattern matching on the one hand and expression evaluation on the other is overcome; the unified notation makes SUMMER more concise and easier to learn. Second, there is a very elegant way of failure handling, which should prove to be very useful especially in the pattern matching context. A quite different aspect of the SUMMER language is discussed at the end of part I, viz., the possibility of using SUMMER as a tool in the design and implementation of programming languages. It has indeed been used to define the syntax and formal semantics of SUMMER itself as can be seen in part II of the book. Additionally, the author briefly reports some applications in the context of compiler writing including data flow analysis and type finding, in which SUMMER was successfully used. Altogether, this reviewer got quite a positive impression of this new string processing language. Unfortunately, there are some serious drawbacks: the first part is far too broad; the reader is confronted with the same arguments over and over again. This culminates in chapter 6 where large parts of chapter 4 are repeated verbatim. The logical structure of the argumentation is not always lucid, and the permanent insertion of cross references is very irritating. So the book is very hard to read, and this might have the effect of discouraging potential users in advance.
    0 references
    programming languages
    0 references
    formal specification
    0 references
    String processing
    0 references
    backtracking
    0 references
    pattern matching
    0 references
    SUMMER
    0 references
    Recovery Model
    0 references
    compiler
    0 references
    data flow analysis
    0 references

    Identifiers