LOGOL(ID:331/log017)

String-manipulation language 


for LOgos and AlGOL

Mysior (Institute of Mathematical Machines)
Waligorski (Western University, Warsaw)
Hucl (Computing Centre Kancelarske strije n.p.)

String-manipulation language. Strings are stored on cyclic lists or 'tapes', which are operated upon by finite automata. Used for computer design.


Structures:
Related languages
ALGOL 60 => LOGOL   Extension of

References:
  • Hucl, C. "LOGOL and its application to computer development" view details Abstract: This paper describes LOGOL, a language mainly intended for the development of computers. It has already been applied to the development of software for computers still in the design stage by means of existing machines, and further to problems in the areas of hardware envelopment, information retrieval and mathematical linguistics, and also to the writing of demonstration programs.  

    LOGOL does not depend on the nature of the computer; it has been applied to binary and decimal, one- and two-address machines.  LOGOL contains a set of macro-statements closely resembling ordinary speech. The language is brief and efficient in writing programs for medium-sized computers. A method for integrating source programs into larger units has been developed. Training in LOGOL is facilitated by its clarity; in particular, its macro-statements correspond closely to the basic elements of block diagrams. The efficiency of the language can easily be extended to further computers by means of a method for the self-compiling of compilers.
    Extract: The Logol Alphabet
    The Logol Alphabet
    Since computers made by different manufacturers differ in the code used for punched tape, the following two codes are available for machines using the LOGOL system:
    Code (1): The "safety code" (adjusted 5-track ELLIOT code, similar to the "internal a code" for storing alphanumeric characters).  It can be used on all computers provided with the LOGOL system and having facilities for reading and punching 5-track tape.
    Code (2): The "original machine code". This makes it possible to use the original peripheral devices designed for each computer, usually with their own code, for preparing source LOGOL programs or data.  It is an advantage to have an internal code for the line printer and teleprinter of the machine identical with code (2).
    Note 1: An explicit assignment of individual characters in both codes is necessary.  This means that code (2) must contain a set of characters capable of expressing the LOGOL alphabet. The relation between code (1) and code (2) is given in a table which is part of the operating description of the LOGOL system as issued for particular computers.
    Note 2: For computers using punched cards only and having no punched tape equipment,  the international IBM code replaces code (1).
    Note 3: All input and output is, in fact, done by means of code (1).  As far as code (2) is concerned, each character involved in a source program 01 in data' is transformed into code (1) by mear s of a programmed "decoder". (There is a i exception: where characters are "copied" no transformation takes place on either the i iput or the output.)
    Note 4: Alphanameric strings are stored in "internal a-code" which, except for a few characters, practically agrees with code (]).  It also allows the comparison of alphanumeric entities, and  heir merging into lexicographical order.
    1.1.  Summary of the LOGOL alphabet
    26        upper or lower-case letters of the Latin alphabet
    10        decimal digits
    (),       brackets, comma
    + -*      addition, subtraction, multiplication
    : /       unrounded and rounded division
    . v       conjunction, disjunction
              space
    (lf)      new-line (for punched tape only)
    ls,fs,cr  letter shift, figure-shift, carriage return
              (for 5-track paper tape)
    Extract: Structure of The Source Statements in LOGOL
    2. Structure of The Source Statements in LOGOL
    Most of the source statements contain two elements: the operator, identifying the type of activity required, and the operand, the subject of that activity. Some of the statements, such as WAIT, STOP, may contain the first element only.
    Sections written in machine code are not permissible in LOGOL; the source language completely implies the facilities of the machine code of the computer to which it is applied. Every source statement is put on a separate line and cannot contain more than one line. Comments can be included; they, too, must be put on separate lines, and each comment is preceded by two colons ": :". The number of characters contained in a line holding an instruction or comment is limited to 72.
    2.1. Structure of the LOGOL operands
    The operands may be divided into constants and variables (i.e. quantities the values of which may be altered in the course of the computing run). Variables are indicated by means of identifiers consisting of one letter and one decimal digit, thus allowing 260 different variables (integer) arrays.
    The variables may assume values corresponding to the three basic kinds of information. Assignment of these values to the variables is achieved either by means of the input data statements or by means of the assignment statements within the source program using the constants contained in the source program.
    Variables may be suffixed, a facility especially valuable for programming loops.  The subscripts used for suffixing are defined by individual letters or decimal constants; they may be "numerical", "simple", or "compound". Subscripts are enclosed in brackets and can only be used for one-dimensional arrays. A variable without a subscript is identical with the same variable provided with a zero subscript, i.e. A = A(0). Subscripts of variables are limited to non-negative values. Subscripts for peripheral equipment are limited to positive values up to the number of peripheral units for the actual computer.
    In input and output instructions the variable may be accompanied by further information specifying the number of characters being read or printed, either by a constant or a further variable, possibly with a numerical subscript.  For example, INPUT DECIMAL A(I), 5 specifies that the decimal number to be read must not contain more than 5 digits.
    Constants occurring in a source program or in the input or output appear in an appropriate form which explicitly specifies their nature from the viewpoint of the three basic kinds of information.
    A decimal constant must not exceed the limit given by the word length of the computer to whicL the s-ystem is applied.
    A minus sign assigned to a decimal constant occurring in a source program must be preceded by tl 3 characters for sending ": -". The constant is no: made negative until the execution phase.
    Inside the computer, decimal integers are represented in the scale of b-m where b is the base of the number system and m the number of digits in a /ord.
    Alphanumeric constants (literals) in the source program need not begin with a letter, but they must be enclosed in 'string brackets' (two pairs of commas ",, ").
    The number of characters (letters or figures) in an alphanumeric constant must not exceed the capacity of the computer used. During compilation,  literals are translated to the "internal encode" so that they can be expressed in numerical form.  This makes possible the comparison, merg ng and sorting of alphanumeric data.
    The individual "character orders" have weight 100 wuen using decimal computers where one character occupies two decimal places, and      * weight 64 when using binary computers where one character occupies six binary places.  Characters for letters must contain a marker for letter shift which increases their decimal value by octal constants in the source program must be written and punched with one space between digits. The weights of individual digits are expressed by the appropriate power of 8. The size of the octal constant must not exceed the word length of the computer used.  Octal constants have the character of logical information and are always considered as unsigned numbers.
    Note 1: In the LOGOL system all the processed information is thus stored in digital form.
    Note 2: In the further syntactic description, upper case letters are used to indicate variables,  lower case letters to indicate constants. A list of permissible subscripts is given in fig. 1.
    2.2.  Structure of LOGOL operators
    The function of most of the operators is self-explanatory, but the meaning of operators for input, output and transfers between internal and external store will be given in greater detail.
    Data transfer from the internal (ferrite-core) store to the external (addressable or non-addressable) store, or the card punch buffer, is specified by the operator
    . .. WRITE...
    Transfer in the opposite direction is defined by the operator
    ... READ.
    Data transfer from the tape reader, the online typewriter, or the card reader is characterized by the operator
    ... INPUT...
    Data transfer in the opposite direction, i.e. output by means of the tape punch, card punch, lineprinter or on-line typewriter is specified by the operator
    . .. OUTPUT...
    2.3.  Syntactic description of the LOGOL language
    The syntactic description of source statements as given in section 3 uses rules similar to those used in the syntactic description of COBOL.  For instance, one of the items enclosed in braces, {}, must be present in the statement, while items enclosed in square brackets, [ ], are optional.
    Extract: Conclusion
    4.  Conclusion
    As already mentioned in the abstract, the language described above has been successfully applied to various logical problems connected directly or indirectly with the work of applied research in tne field of computing machinery. Practical experience has shown that this application is highly eifective; it has led to a significant saving in time and money during the development of software for some new computers in Czechoslovakia.
          in Morrell, A. J. H. (Ed.): Information Processing 68, Proceedings of IFIP Congress 1968, Edinburgh, UK, 5-10 August 1968 view details
  • Mysior, J.; and Waligorski, S "LOGOL, A String manipulation Language" view details Abstract: Abstract. LOGOL is a computer independent string manipulation language. Data, which may have the form of strings in arbitrary alphabets, are stored on cyclic symmetric lists, called tapes. The strings are recognized by finite automata, which can be set on tapes and move along them in both directions. The number of tapes and automata, which may be used in programs,  is practically unlimited. The general concept of LOGOL is quite similar to the concept of the multitape multi-head Turing Machine, but LOGOL has many additional features which make it really useful for practical applications: wide opportunities of handling information stored in the computer, completely automatized translation of strings or their parts from one alphabet into another, the possibility of exchanging tables of automata in a calculation process etc.
    Extract: Introduction
    INTRODUCTION
    LOGOL is designed for programming calculations on strings considered as words in some arbitrary given alphabets.  Calculations performed by programs written in LOGCL consist in examining and recognition of strings by finite automata and in transforming these strings by replacing them or their parts by other strings or some chosen fragments of these strings.  Any program written in LOGOL is a sequence of sentences. Each sentence may be either an instruction or a declaration or an insertion or a label. Every instruction is of one of the following types
    (load) (move) (go to)
    Each type of instruction has its own characteristic separator (=, =, and : respectively).  There is no possibility of programming numerical calculations in LOGOL, but for that purpose one may use insertions, written in another programming language.
    In the general description of LOGOL a reference language has been used which is independent of any digital computer, and any codes used by it. The representation of LOGOL for any digital computer can be obtained by trans-
    f
    lation from a reference language, taking into consideration all the limitations resulting from the type of the computer used.  In addition to the syntactic description we have the semantic description of the particular concepts of the language.  Syntax of LOGOL has been written in a metalanguage which is Backus language completed by iteration used in Kleene's and McNaughton's algebra of regular expressions.  We shall use the following symbols
    := equality
    union (or) ) parenthesis *   iteration 0 the empty word
    In the description we shall not clearly differentiate a word and a set with its only element being this word. An arbitrary string within the brackets ( ) indicates a metalinguistic variable which has non-empty words as its values. Usually for the sake of simplicity this string is chosen in such a way that we can approximately specify the nature of a particular variable. Any underlined string indicates one symbol.
    Concatenation is obtained by writing the variables or symbols next to each other.  We assume that concatenation binds stronger than union.  Iteration of the word X is a union of all results of concatenation of X zero or more times
    X* ::=0|X|XX XXX   ...
    Typographical features such as blank space or change to a new line have no significance in the reference language. They may be used freely for facilitating reading.

          in Bobrow, D. G. (ed) "Symbol Manipulation Languages and Techniques", Proceedings of the IFIP Working Conference on Symbol Manipulation Languages. North-Holland Publishing Co., Amsterdam, 1968 view details
  • Stock, Karl F. "A listing of some programming languages and their users" in RZ-Informationen. Graz: Rechenzentrum Graz 1971 137 view details Abstract: 321 Programmiersprachen mit Angabe der Computer-Hersteller, auf deren Anlagen die entsprechenden Sprachen verwendet werden kennen. Register der 74 Computer-Firmen; Reihenfolge der Programmiersprachen nach der Anzahl der Herstellerfirmen, auf deren Anlagen die Sprache implementiert ist; Reihenfolge der Herstellerfirmen nach der Anzahl der verwendeten Programmiersprachen.

    [321 programming languages with indication of the computer manufacturers, on whose machinery the appropriate languages are used to know.  Register of the 74 computer companies;  Sequence of the programming languages after the number of manufacturing firms, on whose plants the language is implemented;  Sequence of the manufacturing firms after the number of used programming languages.]
          in Bobrow, D. G. (ed) "Symbol Manipulation Languages and Techniques", Proceedings of the IFIP Working Conference on Symbol Manipulation Languages. North-Holland Publishing Co., Amsterdam, 1968 view details
  • Stock, Marylene and Stock, Karl F. "Bibliography of Programming Languages: Books, User Manuals and Articles from PLANKALKUL to PL/I" Verlag Dokumentation, Pullach/Munchen 1973 331 view details Abstract: PREFACE  AND  INTRODUCTION
    The exact number of all the programming languages still in use, and those which are no longer used, is unknown. Zemanek calls the abundance of programming languages and their many dialects a "language Babel". When a new programming language is developed, only its name is known at first and it takes a while before publications about it appear. For some languages, the only relevant literature stays inside the individual companies; some are reported on in papers and magazines; and only a few, such as ALGOL, BASIC, COBOL, FORTRAN, and PL/1, become known to a wider public through various text- and handbooks. The situation surrounding the application of these languages in many computer centers is a similar one.

    There are differing opinions on the concept "programming languages". What is called a programming language by some may be termed a program, a processor, or a generator by others. Since there are no sharp borderlines in the field of programming languages, works were considered here which deal with machine languages, assemblers, autocoders, syntax and compilers, processors and generators, as well as with general higher programming languages.

    The bibliography contains some 2,700 titles of books, magazines and essays for around 300 programming languages. However, as shown by the "Overview of Existing Programming Languages", there are more than 300 such languages. The "Overview" lists a total of 676 programming languages, but this is certainly incomplete. One author ' has already announced the "next 700 programming languages"; it is to be hoped the many users may be spared such a great variety for reasons of compatibility. The graphic representations (illustrations 1 & 2) show the development and proportion of the most widely-used programming languages, as measured by the number of publications listed here and by the number of computer manufacturers and software firms who have implemented the language in question. The illustrations show FORTRAN to be in the lead at the present time. PL/1 is advancing rapidly, although PL/1 compilers are not yet seen very often outside of IBM.

    Some experts believe PL/1 will replace even the widely-used languages such as FORTRAN, COBOL, and ALGOL.4) If this does occur, it will surely take some time - as shown by the chronological diagram (illustration 2) .

    It would be desirable from the user's point of view to reduce this language confusion down to the most advantageous languages. Those languages still maintained should incorporate the special facets and advantages of the otherwise superfluous languages. Obviously such demands are not in the interests of computer production firms, especially when one considers that a FORTRAN program can be executed on nearly all third-generation computers.

    The titles in this bibliography are organized alphabetically according to programming language, and within a language chronologically and again alphabetically within a given year. Preceding the first programming language in the alphabet, literature is listed on several languages, as are general papers on programming languages and on the theory of formal languages (AAA).
    As far as possible, the most of titles are based on autopsy. However, the bibliographical description of sone titles will not satisfy bibliography-documentation demands, since they are based on inaccurate information in various sources. Translation titles whose original titles could not be found through bibliographical research were not included. ' In view of the fact that nany libraries do not have the quoted papers, all magazine essays should have been listed with the volume, the year, issue number and the complete number of pages (e.g. pp. 721-783), so that interlibrary loans could take place with fast reader service. Unfortunately, these data were not always found.

    It is hoped that this bibliography will help the electronic data processing expert, and those who wish to select the appropriate programming language from the many available, to find a way through the language Babel.

    We wish to offer special thanks to Mr. Klaus G. Saur and the staff of Verlag Dokumentation for their publishing work.

    Graz / Austria, May, 1973
          in Bobrow, D. G. (ed) "Symbol Manipulation Languages and Techniques", Proceedings of the IFIP Working Conference on Symbol Manipulation Languages. North-Holland Publishing Co., Amsterdam, 1968 view details