COGENT(ID:220/cog001)

COmpiler and GENeralized Translator 


COmpiler and GENeralized Translator. Computer Sciences Corp 1965  

Compiler writing language with pattern-directed string and list processing features, for CDC 3600 and CDC 3800.

A program consists of productions defining a context-free language, plus analysis and synthesis function generators.


Structures:
Related languages
Hanford Mark II => COGENT   Extension of
COGENT => SERIES   Evolution of

Samples:
References:
  • Reynolds, J.C. "An Introduction to the COGENT System" view details Abstract: THE COGENT (COmpiler and GENeralized Translator) programming system is a compiler whose input language is designed to describe symbolic or linguistic manipulation algorithms. Although the system is intended primarily for use as a compiler compiler, it is also applicable to such problem areas as algebraic manipulation, mechanical theorem-proving, and heuristic programming. In designing the system the major objective has been to unify the concept of syntax-directed compilation1 with the more general but primitive concept of recursive list-processing2. This objective is achieved by using the syntax of a language to define a mapping between strings of the language and list structures. Given such a mapping, linguistic processes become equivalent to list processes, and a list-processing language becomes a concise vehicle for describing such processes. Thus a program written in the COGENT language is a list-processing program in which the list structures normally represent phrases of one or more object languages (i.e., the input and output languages to be processed by the program), in a representation determined by the syntax of these languages. Correspondingly, the COGENT language itself contains two major constructions: productions, which define the object language syntax, and generator definitions, which define list-processing subroutines called generators.
          in [ACM] Proceedings of the 1965 20th National Conference 1965 , Cleveland, Ohio, United States view details
  • Reynolds, J.C., "COGENT Programming Manual", ANL-7022, Argonne, Mar 1965. view details
          in [ACM] Proceedings of the 1965 20th National Conference 1965 , Cleveland, Ohio, United States view details
  • Mandell, R. and Estrin, G. "A meta-compiler as a design automation tool" pp13.1-13.40 view details
          in [ACM/IEEE] Proceedings of the SHARE Design Automation Project Annual ACM IEEE Design Automation Conference 1965 view details
  • Reynolds, J C "COGENT 1.2 Operations Manual", Technical Report CS37, Computer ScienceDepartment, Stanford University, April 1966. view details Abstract: This document is an addendum to the COGENT Programming Manual (Argonne National Laboratory, ANL-7022, March 1965, hereafter referred to as CPM) which describes a specific implementation of the COGENT system, COGENT 1.2, written for the Control Data 3600 Computer. Chapters I and II describe a variety of features available in COGENT 1.2 which are not mentioned in CPM; these chapters parallel the material in Chapters II and III of CPM. Chapter III of this report gives various operational details concerning the assembly and loading of both COGENT-compiled programs and the compiler itself. Chapter IV describes system and error messages. Familiarity with the contents of CPM is assumed throughout this report. In addition, a knowledge of the 3600 operating system SCOPE, and the assembler COMPASS is assumed in Chapter III. ftpOnline at Stanford
          in [ACM/IEEE] Proceedings of the SHARE Design Automation Project Annual ACM IEEE Design Automation Conference 1965 view details
  • Abrahams, Paul W. "Symbol manipulation languages". New York: New York University, Courant Inst. of Mathematical Sciences 1968 view details
          in [ACM/IEEE] Proceedings of the SHARE Design Automation Project Annual ACM IEEE Design Automation Conference 1965 view details
  • Feldman, Jerome and Gries, David "Translator writing systems" p77-113 view details Abstract: A critical review of recent efforts to automate the writing of translators of programming languages is presented. The formal study of syntax and its application to translator writing are discussed in Section II. Various approaches to automating the postsyntactic (semantic) aspects of translator writing are discussed in Section III, and several related topics in Section IV. Extract: COGENT
    COGENT (Reynolds [Rey 65])
    The COGENT system, designed at Argonne National Laboratory and implemented on a CDC 3600, draws heavily on the ideas of Brooker and Morris (Section III.B.3), Irons [Ir 61, May 61], and LISP COGENT is very well thought out and is considerably more comprehensive than the other systems described in this section. The COGENT compiler is written completely in its own language. By boot-strapping three times, its own compilation speed has been increased by a factor of six.
    A program written in COGENT consists of two parts: the syntax and a set of processing routines called generators.
    The syntax is given by a synthetic phase structure grammar. Almost any context free grammar is acceptable, including those with left recursion; only a few restrictions are made concerning empty right parts. The recognizer which uses the grammar is modified top-down, with alternatives at each step being processed in parallel. A string is accepted if the recognizer finds a unique syntax tree for it.
    Syntactic analysis produces a list structure to represent the intermediate tree. For example, use of the production
    (term) ::= (term) + (factor)
    would produce a list element (term) with pointers to the subtrees for (term) and (factor).
    One can precede any production by a name of a generator (semantic routine), which is then executed when that production is used in building the tree. When there is more than one possible syntax tree (due to parallel processing of alternatives), the execution of these generators is delayed and syntax analysis continues until the local ambiguity is resolved and only one tree remains. Then all the generators are called in the correct order.
    As an example, consider the labeled production:
    processterm / (term) :: = (term) + (factor)
    When a subtree with (term) as the root is completely formed, the generator processterm will be called, with the subtrees for (term) and (factor) as arguments. Processterm may manipulate these subtrees, delete them, produce code corresponding to them, and so forth.
    The generator language is based on list processing operations and the mechanism of failure. List elements may have varying numbers of pointers to other elements. The types of list elements include numbers (fixed or floating), generator entry pointers, dummy elements, identifier elements, and parameter elements. Fixed point numbers may be of any magnitude and take up sufficient words to represent that magnitude. This feature facilitates symbolic mathematics applications of COGENT.
    In addition to the conventional assignment statements, generators may use synthetic and analytic assignment statements to describe the synthesis and analysis of list structures.
    A synthetic assignment statement has the form
    (identifier)/= (template), (expression list)
    where a (template), used for pattern matching, looks like a production in parentheses with "/" substituted for" :: ="
    The statement causes the (identifier) to be a copy of the (template), in which the ith parameter (nonterminal) is replaced by the valve of the ith expression in the (expression list). For example, the execution of the synthetic assignment statement
    Z/= ((term) / (factor)*(factor)), X, Y
    where X has the value ((factor)/ABE) and Y the value (@actor)/BED), would assign to Z a copy of ((termS~ABE • BED).
    Similarly, analytic assignment statements of the form (test expression) =/(template), (identifier list) are used to decompose an expression. The (test expression} is matched against the (template}. If they match, the value corresponding to the ith parameter (nonterminal) of the template is assigned to the ith identifier of the (identifier list). Thus if Z has the value ((term)/ ABE * BED), then the statement
    Z = / ((term} / (factor),(factor)), X, Y
    will give X the value ((factor}/ ABE) and Y the value
    ((factor}/BED).
    If (test expression} and (template} do not match, the analytic assignment statement fails. Failure is the method of branching in COGENT. If no conditional statement includes the action that fails, the entire generator fails. This failure proceeds up the chain of generator calls until some conditional statement is encountered.
    A program in COGENT can use any number of symbol tables. The action label $IDENT n specifies that the result of that production (which must be a character string) should be placed in symbol table n. If it is already there, a pointer to the old copy will be returned; i.e. all identifiers in any given table have unique character strings. Each entry in a table consists of the identifier plus a pointer element, which normally points to the attributes of that identifier.
    Output is achieved by calling the routine PUTP with a single parameter--the internal code of a character to be placed in the output line. When the line is filled, it is written out and a new line started; however, OUTP can be called to print out a line before it is completely filled.
    Another primitive generator, STANDSCN (X, PUTP), will map a list structure X into the string S represented by its end nodes. STANDSCN finds the symbols in S and passes them one at a time to PUTP.
    COGENT is admittedly experimental and has several shortcomings. The structure of the language for generators is not as neat as ALGOL has shown languages can be. One syntax error in the input is fatal. List processing should be generalized to include arbitrary plex-creation, rather than just plexes based on the syntax. COGENT has been applied to a number of problems in symbolic mathematics.
    Reynolds has suspended work on COGENT pending the development of a better theory of data structures, which he, among others, is working on (cf. Section IV.C).
          in [ACM] CACM 11(02) (February 1968) view details
  • Sammet, Jean E. "Revised Annotated Descriptor Based Bibliography for the Use of Computers for Non-Numerical Mathematics" view details
          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
  • FRY, J. and GOSDEN, J. "Survey of Management Information Systems and Their Languages" in Critical Factors in Data Management, F, Gruenberger, (Ed.), McGraw-Hill Book Co., 1969, pp41-55. view details Extract: COGENT III
    Background. COGENT III, a COBOL-compatible generalized file management system, is an advanced general-purpose data management system developed by Computer Sciences Corporation (CSC) for the IBM/360 family of equipment. COGENT III represents the next development in a series of generalized file management systems produced by CSC. It follows COGENT II, also developed for the IBM/360 family, a series of COGENT systems developed for the IBM 7090, UNIVAC 1107/1108, IBM 7044, and RCA SPECTRA 70.
    COGENT III is modular in construction and is designed to function on a wide range of System/360 configurations. It provides for use of unit record, magnetic tape, and direct access devices, as well as teleprocessing equipment. The system employs and is compatible with O/S 360 and the related COBOL compiler.
    Summary of Capabilities. COGENT III generalizes the major data processing functions associated with information storage, maintenance, retrieval, and presentation. The system allows for use of a common data base by various groups of users. This facility is provided under the control of a single, comprehensive data directory that describes all data used or referenced by the system, as well as describing the relationships between data sets, records, and data fields in the data base.
    COGENT III consists of an information system language and a language processor (implemented in COBOL) that interprets this language and generates functional COBOL programs for maximum machine independence to perform the information system tasks requested. In addition an interactive inquiry retrieval and storage language is provided to meet rapid response requirements. This language is processed by the COGENT III Interpretive Processor which is implemented in assembly language employing re-entrant code. The system provides for specification and generation of program(s) for a simple function, an entire data processing application, and/or a series of integrated applications in addition to interpretive processing of dynamic requests for information storage and retrieval including on-line data input.
    Specific Capabilities. The information system language consists of fixed-form data descriptions and functional specifications as well as an interactive inquiry and storage language. The language elements are designed to allow specification of the information needs of information collection, storage, maintenance, retrieval, and presentation for various levels of users, such as management, operating personnel, and system analysts.
    In general the language allows the user to specify the following:
    1.     information to be stored in the data base
    2.     source of the information
    3.     how  and under what conditions  the information is  created  and
    maintained
    4.     what relationships exist between different collections of information
    (hierarchical structure and integration between data sets)
    5.     who can have access to modify or retrieve the information
    6.     how and under what conditions the information is to be retrieved
    7.     how the information is to be presented
    8.     on-line, off-line, batched, real-time or demand processing of tasks
    The Data Descriptions allow the user to describe such items as data fields, relationships between data fields, security codes for maintenance and retrieval, decoding and encoding association tables, physical characteristics of data elements, and presentation format of data elements, which fields may be used as access keys for content retrieval, and which fields are record identifiers.
    The Functional Specifications allow the user to specify
    1.     the task control information for creation, maintenance, sorting, and
    reporting
    2.     the processing mode?direct, demand, or batch
    3.     the file structure?-serial or direct
    The interactive inquiry retrieval and storage language allows the user to access the data base via ad hoc queries and execution of previously defined queries. The user can obtain immediate response or can batch queries.
    Hierarchical data structures are provided on both serial, direct access data sets as well as between multiple data sets. In most cases, hierarchical records physically follow their associated higher level records. In the case of multiple data sets, different levels of hierarchical records may be physically stored on different devices (direct access only).
    When stored on direct access devices, the record keys as defined by the Data Description language are employed to build a record key index. This is one method of content access used to provide rapid response. Records are indexed by hierarchical group only. Individual records within the hierarchy are extracted in core from physical "blocks containing a hierarchical group.
    An Access Key index is automatically constructed for each data field defined as an access field in the Data Description language The index contains an entry for each possible field value with pointers (record key) to all physical blocks that contain the value. This is a selective form of content access.

          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
  • Sammet, Jean E. "Computer Languages - Principles and History" Englewood Cliffs, N.J. Prentice-Hall 1969. p.638. view details Extract: COGENT
    The COGENT (COmpiler and GENeralized Translator) programming system on the CDC 3600 and 3800 is an attempt to combine elements From syntax-directed compiling and list structures. Quoting from its developer, Reynolds, "Thus a program written in the COGENT language is a list processing program in which the list structures normally represent phrases of one or more object languages (i.e., the input and output languages to be processed by the program), in a representation determined by the syntax of these languages. Correspondingly, the COGENT language itself contains two major constructions: productions, which define the object language syntax, and generator definitions, which define list processing subroutines called generators."

    A generator is actually a subroutine for manipulating list structures and has a language form similar to that of an ALGOL procedure. However, it differs conceptually in that the values of the variables for the generators are list structures, usually representing phrases of the object language. The meaning of variables, expressions, and simple assignment statements is the same in COGENT as in most programming languages. However, there are synthetic and analytic assignment statements to deal with list structures. As an example of an analytic assignment statement, if Z has the value (TERM/ABE,BED) then the statement

    Z / = (TERM/(FACTOR)*(FACTOR)),X,Y.

    will give X the value (FACTOR/ABE) and Y the value (FACTOR/BED). As an example of a conditional statement, preceding the statement above by

    +10 IF

    will cause X and Y to be assigned the factors of Z if it has any, and it will transfer control to statement 10; otherwise control goes to the next statement without changing X and y.{7} A complete example for translating algebraic expressions from Polish prefix notation into conventional infix notation is given in Reynolds [RE65a]. Extract: about COGENT
    COGENT
    The COGENT (COmpiler and GENeralized Translator) programming system on the CDC 3600 and 3800 is an attempt to combine elements From syntax-directed compiling and list structures. Quoting from its developer, Reynolds, "Thus a program written in the COGENT language is a list processing program in which the list structures normally represent phrases of one or more object languages (i.e., the input and output languages to be processed by the program), in a representation determined by the syntax of these languages. Correspondingly, the COGENT language itself contains two major constructions: productions, which define the object language syntax, and generator definitions, which define list processing subroutines called generators.''{6} The productions are similar to those of the Backus Normal Form discussed in Section II.6.2. A generator is actually a subroutine for manipulating list structures and has a language form similar to that of an ALGOL procedure. However, it differs conceptually in that the values of the variables for the generators are list structures, usually representing phrases of the object language. The meaning of variables, expressions, and simple assignment statements is the same in COGENT as in most programming languages. However, there are synthetic and analytic assignment statements to deal with list structures. As an example of an analytic assignment statement, if Z has the value (TERM/ABE,BED) then the statement
    Z / = (TERM/(FACTOR)*(FACTOR)),X,Y.
    will give X the value (FACTOR/ABE) and Y the value (FACTOR/BED). As an example of a conditional statement, preceding the statement above by
    +10 IF
    will cause X and Y to be assigned the factors of Z if it has any, and it will transfer control to statement 10; otherwise control goes to the next statement without changing X and y.{7} A complete example for translating algebraic expressions from Polish prefix notation into conventional infix notation is given in Reynolds.
          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
  • Petrick, S. R. "On the use of syntax-based translators for symbolic and algebraic manipulation" view details Abstract: In this paper two w ell known formalisms, due to Irons and Knuth, for mapping syntactic tree structures into appropriate target strings or structures are considered. Their utility as general purpose tools for symbolic and algebraic manipulation is illustrated by applying them to a symbolic differentiation exercise. A few of the existing syntax-based translation systems and the uses to which they have been put are discussed. Finally, attempts to mathematically model syntax-based translators are reviewed. Extract: About COGENT
    COGENT

    The COGENT System was developed by John Reynolds of the Argonne National Laboratory, using the Control Data 3600 Computer. Although there is a final debracketization to yield a target language string, intermediate translations are list structures which are operated upon by list processing procedures which Reynolds calls generators. It is this facility more than any other that makes COGENT suitable for many symbolic and algebraic manipulation tasks. To illustrate his system, Reynolds devotes a chapter of his COGENT Programming Manual to a treatment of symbolic differentiation.

    Time and space do not permit a very complete treatment of COGENT, but the following properties may be of interest. COGENT is basically an Irons type of translator as presented in this paper. Its parsing procedure is, in terms of reference Z5, the NDS algorithm, however, whereas Irons's is the SBT algorithm. The parser is nondeterministic (allows for "backup") but forced phrase structure rule choices can be indicated by anotation provided. Translation rules (generators) can be associated with each non- terminal expansion of a CF grammar. Each returns a single value, but side effects are possible such as the storing and referencing of generated structures, outputting of target language code, etc. List structures are automatically built up to reflect parsed structure.

    [...]

    The result of applying a generator program to such a list structure is a substitute list structure. As in the case of the META translators, it would not appear to be difficult to supply an equivalent Knuth translator given a particular COGENT language specification of a translator.

          in [ACM] Proceedings of the Second Symposium on Symbolic and Algebraic Manipulation, March 23-25, 1971 Los Angeles (SYMSAM 71) view details
  • Sammet, Jean E., "Roster of Programming Languages 1972" 56 view details
          in Computers & Automation 21(6B), 30 Aug 1972 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 126 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 Computers & Automation 21(6B), 30 Aug 1972 view details
  • Fry, James P.; Sibley, Edgar H. "Evolution of Data-Base Management Systems" view details
          in [ACM] ACM Computing Surveys (CSUR) 8(1) March 1976 view details