CPS(ID:223/cps001)

Conversational Programming System 


Conversational Programming System. Interactive extended subset of PL/I.


Related languages
PL/I => CPS   Subset
CPS => GAP   Target language for
CPS => POGO   Built on

References:
  • "Conversational Programming System under TSO (PBPO), Terminal User's Manual", SH20-1197, IBM. view details
  • [IBM] Conversational Programming System, IBM Corp., Contributed Program Library #360D 03. 4. 016, Program Information Dept., Hawthorne, N.Y. (Sept., 1967). view details
  • CPS-Terminal User's Manual, IBM Corp., Technical Report TM 48.67.006, Boston Programming Center, Cambridge, Mass. (Sept. 1967). view details
  • Sammet, Jean E., "Roster of Programming Languages 1967" view details
          in Computers & Automation 16(6) June 1967 view details
  • Sammet, Jean E. "Computer Languages - Principles and History" Englewood Cliffs, N.J. Prentice-Hall 1969. p.232-240. view details Extract: CPS
    CPS (Conversational Programming System) is a small PL/I-like on-line extended subset. It was developed jointly by the Allen-Babcock Corporation (primarily involving J. D. Babcock and P. R. DesJardins) and the IBM Corporation, under the overall direction of N. Rochester of IBM with significant participation by D. A. Schroeder (IBM). It was started early in 1965, and the initial version became operational in the fall of 1966. The philosophy of the system was to provide a language that was in the middle area between JOSS and QUIKTRAN. This meant that it should have as much simplicity as possible for the terminal user, but the language should have as much of the syntax of PL/I as possible. Considering the time scale, the major objective of simplicity, and the size of PL/I, the amount of PL/I which was included naturally had to be small. (This does not mean that CPS itself is small.) A second major objective of the system was to investigate the effectiveness of microprogramming. The system was originally implemented on an IBM 360/50 with a special Read-Only store which was used for special machine instructions to make the language interpreter more efficient. However, subroutines were also written to replace the microprograms and thus avoid the necessity for special hardware.

    [...]
    Identifiers used for both data names and program unit labels consist of an alphabetic character followed by zero to five alphameric characters. Identifiers can be the same as key words. In addition, line numbers consisting of up to four digits followed optionally by a decimal point and one or two digits can also be written. (These are used for referencing and changing statements in the program.) Subscripts are shown separated by commas, contained in parentheses after the data name. Subscripts can be expressions and can themselves be subscripted. Punctuation is significant in a number of cases. Blanks are used as delimiters and can also follow punctuation symbols. (In general, the PL/I rules are followed.) The input is free form, but a statement cannot extend over one line; only one statement may appear on one line.

    The basic concept in writing a CPS program is that there are two forms of statements: Collect and direct. The former define the steps to be executed; while the latter specify control functions. A collect statement must be preceded by a line number and is automatically inserted in the correct sequence determined by the numerical value of the line number. It will replace any earlier statement with the same line number. A direct statement is immediately preceded by a percent sign, %. Some statements can be written ill both modes. Single statements can be written and also grouped by a DO... END pair. Loops are written using either IF... THEN or a DO statement. Built-in functions are provided, and the user can also define his own. Both kinds can be used in expressions or in user-defined functions. The latter can have an arbitrary number of parameters but can contain only a single statement. Statements are terminated by either a carriage return or a semicolon followed by a carriage return. A statement label can immediately precede a collect statement and is itself followed by a colon.

    Arithmetic floating point variables are the only type permitted. The net effect of Boolean variables can be obtained by appropriate combining of conditions, e.g., A>B & C< = D. Individual relations and their logical combinations are assigned the values 1 or 0 for truth or falsity, respec-tively. The relations permitted are > = , < =, =, {}=, <,>. In addition, A|B evaluates to +1 if either |A| > = 1 or |B|>= 1 and to 0 otherwise. Both single- and double-precision floating point arithmetic is done; tile system automatically retains 14 significant digits in all computations. If an expression contains a variable naming an array, the operations are performed on all corresponding elements of these arrays.

    The assignment statement permits array variables on both sides of the equals sign and also permits multiple assignments, e.g.,

    F(3*a - b), G(2 + B(3, 5)) = A + SQRT(x***2 + y**2)

    The unconditional transfer is written as GOTO or GO TO label. Functions are invoked by writing them in expressions. Although subroutines as such are not allowed in the program, there is a convenient way of causing execution of groups of statements. This is done by the direct command EXECUTE (which can also be written as XEQ). This has the following format, where braces { } denote a choice and square brackets [ ] indicate something

    optional:

    {EQUATE} [{line -number-1} [THUR {line-number-2}]] {XEQ } [{label-name-1 } [ {label-name-2 }]] [ [ {... }]]

    It is required that line-number.1 be less than or equal to line-number-2. The option of three dots (...) represents the end of the program. If a line-number is not specified, execution resumes at the line following the last line executed by the previous EXECUTE. When an EXECOTE specifying only an initial label name is used and it is the label of a DO group, the entire DO group is executed.

    The conditional statements of the form IF expression THEN statement-1; [ELSE statement-2;]. The expression is true if its absolute value is greater than or equal to 1 and false otherwise. Both statement-1 and statement-2 can be any collect statements except DO, END, LET, IMAGE, or DECLARE. For example,

    IF a=b & c=d THEN x = 3.14/b; ELSE x=c;

    IF a{}=b | SQRT(C**2) < d THEN GO TO end;

    If nested IFs are used, the ELSE clause must be written explicitly.
    The loop control is handled by means of a DO statement. This is of the form

    label: DO [{,var = spec-1, spec-2, ..., spec-n}]; [{WHILE (expression) }]; ...

    END label;where the range is denoted by the first succeeding END statement that has the same label as the DO. The spec-i can be any of the following forms:

    expr-1 [WHILE (expr-4)] expr-1 BY expr-3 [TO expr-2] [WHILE (expr-4)] expr-1 TO expr-2 [BY expr-3] [WHILE (expr-4)]

    If BY is omitted, the value +1 is assumed; if TO is omitted, the largest positive value representable is assumed. The following examples show' a few cases:

    A: DO X = 1 WHILE (Y
    Note that it would be illegal to reverse the position of the END statements.

    The input/output statements are GET, PUT, and LIST. Their formats are as follows:

    GET LIST (var-1, var-2, ..., var-n); PUT {LIST } (e-1, e-2, ..., e-n) {label]; {IMAGE } (e-1, e-2, ..., e-n) {label];

    LIST [{line-number-1}[ THUR {line-number-2}]]; [{label-1 } [THRU {table-2 }]]; ... The GET causes the system to obtain (or prepare to obtain since GET can be both collect and direct) data from the terminal Values can be assigned to both single variables and arrays The PUT provides output to the terminal, with optional formatting and spacing, and allows expressions rather than just variable or array names. The IMAGE option in the PUT is a format statement providing various types of numeric conversion, specific number and placement of characters, or other text reproduced as it was input. The physical placement of the carriage while typing the IMAGE statement is used to specify the output positioning, so the user can easily see his format.

    The LIST command causes printing of the specified portion of the program.

    There are a number of built in functions provided. In addition to the fairly standard mathematical ones, there are functions for determiningmaximum, minimum, absolute value, floor, ceiling, truncation, sign, and remainder. The routines for sine, cosine. and arctangent are available in both radians and degrees.

    The ERASE command has the same format as the LIST command and causes the deletion of the specified statement(s).

    The STOP terminates execution. It can be resumed with tile statement following the STOP by using one of the EXECUTE forms in which tile line number is omitted.

    An interesting command is tile RESEQ, which causes immediate resequenching of a program based on the information shown in the command; the format is

    RESEQ [line-1] [THRU {line-2}][BY incr][FROM line-3]; [ {... }]

    where file line numbers identify the beginning and ending lines of the set to be resequenced and the increment to be used is shown. The line-3 specifies the first line number to be assigned. Standard values are defined for each optional parameter. Thus the user can write

    % RESEQ 2 THRU ...

    % RESEQ 7. THRU 105 BY 10 FROM 1;

    % RESEQ BY 100;

    There are three declarations: DECLARE, IMAGE, and LET. The DECLARE (also written DCL) provides the dimension information for arrays, e.g., DCL A(2:15, -2:8, 7). The dimension ranges from the first number to and including the second number in steps of 1. The second number must be greater than or equal to the first. If a single number is shown, it is treated as the upper dimension with an implied first number of ].

    The IMAGE provides formatting information; this was mentioned earlier. The LET provides the function definitions by writing

    LET function-name (pi[,p2 ..., pn) = expression;

    where the pi are parameters, e.g.,

    LET ROOT (A,B,C) = (-2*A + SQRT(B**2 - 4*A*C)

    Other commands provided in CPS relate to its usage as an on-line system.

    Of the statements which have been discussed here, the following can only be used as direct statements (which means they must be preceded bya % when used): ERASE, EXECUTE, RESEQ, LIST. All other executable statements can be either collect or direct. The three declarations can be used as collect statements only.

    CPS provides a very small PL/l-like subset with some additional commands to make the terminal usage more efficient. It thus can provide a nontrivial introduction to a complex programming language to someone who has never programmed before. It is also a useful on-line system for experienced programmers with small problems, and has been successfully used by administrators for simple clerical, bookkeeping, and budgeting activities.

          in Computers & Automation 16(6) June 1967 view details
  • Reinfelds, J. "AMTRAN: An Interactive Computing System", pp537- 542 view details Extract: COMPARISON WITH OTHER HIGH LEVEL LANGUAGES
    COMPARISON WITH OTHER HIGH LEVEL LANGUAGES
    A comparative study between AMTRAN and other
    high level languages has to be divided into two parts. Only language features can be compared with batch mode languages, whereas the whole AMTRAN- system can be taken into account for a comparison with other interactive systems.
    Batch mode languages
    Most likely, PL/1, ALGOL, or FORTRAN would be used to solve mathematical, technical or scientific problems in batch mode. A comparison with AMTRAN is not really feasible as the basic philosophy and design principles of batch mode languages are completely different from AMTRAN.
    Since language development goes more and more in the direction of powerful general purpose languages, it becomes more and more difficult, time consuming, and cumbersome for the nonprogrammer to make the first step towards use of a computer. But even for the experienced user, the three languages mentioned above do not provide the convenience and facilities in programming that AMTRAN does. They need type and dimension declarations; the flexibility in changing types and dimensions at run time is lacking; and they do not have AMTRAN's array handling capabilities.
    PL/1 with its default philosophy, its various types of storage allocation, and certain automatic array arithmetic features is close to AMTRAN's facilities and philosophy of programming convenience. On the other hand, it is inconvenient for the user to keep track of storage allocation  problems in writing recursive or re-entrant programs or in using arrays with computed origin.
    PL/1 is truly a general purpose programming language. It is designed for programming needs in science, engineering, data management, and business. AMTRAN, on the other hand, is a special purpose programming language for mathematical, scientific, and technical applications and has not been designed to compete in general with a language like PL/1. It is not intended to handle extensive data; therefore, it does not need powerful I/O-capabilities and sophisticated formatting facilities. But it can compete or even perform better within the limits of its special purpose.
    Interactive systems
    An interactive console system fills the gap between a desk top calculator and conventional batch mode
    computer programming. On one hard, it has to give immediate answers to simple request on the other hand,  it has to provide powerful programming capabilities.
    A milestone in the development of interactive systems was the Culler-Fried-Systen . which strongly influenced the early AMTRAN development. Prof. Culler's system represents a highly powerful multi-console system. A disadvantage is that it does not stay close to the mathematical notation, and it is not simple and easy to learn.
    CPS is a conversational subset of PL/1. It has a calculator mode and a program mode and is a useful conversational system although it does not have AMTRAN's flexibility and power in a ray and function handling.
    Iverson's language APL (A Programming Language) is a more formal approach to application programming. It is particularly useful for classical mathematical applications, and it has been implemented as a powerful interactive time-sharing system. The language has features such as array arithmetic, programming capabilities, and a large set of primitive operators including matrix handling operators. An extenstive set of special symbols is used instead of keywords. Thus, a special typewriter is necessary. The proponents of APL claim that its source code is more efficient per statement than that of any other programming language. On the other hand, it is less readable. One has to learn special symbols instead of using mnemonics. For example, the quad [] in APL is less informative as an output operator than the TYPE in AMTRAN.
    Major disadvantages are that APL does not follow classical mathematical notation, there is no hierarchy among operators, and the order of execution of statements is from right to left. This meat the mathematician and scientific nonprogrammer must convert his formulas, written in normal textbook format, into the APL-notation, and the programmer experienced in any other language is even more confused. APL is a language which requires both care and training for simple applications.

          in [AFIPS] Proceedings of the 1970 Fall Joint Computer Conference FJCC 37 view details
  • Sammet, Jean E. "Roster of Programming Languages for 1973" p147 view details
          in ACM Computing Reviews 15(04) April 1974 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 151 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 ACM Computing Reviews 15(04) April 1974 view details
  • Kochenburger, Ralph J. and Turcio, Carolyn J. "Introduction to PL/1 and PL/C programming : with commentary on CPS-PL/1" Santa Barbara (Calif.) : Hamilton, 1974. view details
          in ACM Computing Reviews 15(04) April 1974 view details
  • Sammet, Jean E "Roster of programming languages for 1976-77" pp56-85 view details
          in SIGPLAN Notices 13(11) Nov 1978 view details
  • Kupka, I. and Wilsing, N. "Conversational Languages" John Wiley, 1980 view details
          in SIGPLAN Notices 13(11) Nov 1978 view details
  • Sammet, Jean E. "History of IBM's Technical Contributions to High Level Programming Languages" pp520ff view details
          in IBM Journal of Research and Development, 25(5), September 1981 25th anniversary issue view details
  • Smillie, K W. review of Sammet 1981 in ACM Computing Reviews September 1982 view details Abstract: This paper gives an assessment of the contributions of IBM to the development of programming languages. It begins with a very brief survey of the development of programming languages in order to place the work of IBM in perspective, followed by a few remarks on Speedcoding and PRINT, two very early attempts within IBM to develop programming languages. The four languages considered by the author to be major contributions by IBM are FORTRAN, GPSS, APL, and PL/I. The summary of the development of these languages is based primarily on the papers presented at the History of Programming Languages Conference in Los Angeles in 1978, and will be familiar to the readers of either the Preprints or the Proceedings of this conference. Several other languages -- Commercial Translator, FORMAC, SCRATCHPAD, QUIKTRAN, and CPS -- which have made important but lesser contributions are discussed briefly. A few remarks are made on IBM's contribution to the syntactic and semantic description of languages with Backus-Naur Form and the Vienna Definition Language, respectively. There is a list of 58 references.

    The author is eminently qualified to have written this paper. She is a long-time employee of IBM, and has written many papers and a definitive book on the development of programming languages. Her account of the contributions of IBM to the development of programming languages is itself a contribution to the subject.
          in IBM Journal of Research and Development, 25(5), September 1981 25th anniversary issue view details