PL/C
Developer Cornell University | | |
First appeared | 1970 | |
---|---|---|
Stable release | Release 7.6
/ 1977 | |
strong | ||
Dialects | ||
PL/CT, PL/CS, PL/CV | ||
Influenced by | ||
PL/I, CUPL |
PL/C is an instructional dialect of the programming language PL/I, developed at the Department of Computer Science of Cornell University in the early 1970s in an effort headed by Professor Richard W. Conway and graduate student Thomas R. Wilcox.[1] PL/C was developed with the specific goal of being used for teaching programming. The PL/C compiler, which implemented almost all of the large PL/I language, had the unusual capability of never failing to compile a program, through the use of extensive automatic correction of many syntax errors and by converting any remaining syntax errors to output statements. This was important because, at the time, students submitted their programs on IBM punch cards and might not get their output back for several hours.[2] Over 250 other universities adopted PL/C;[3] as one late-1970s textbook on PL/I noted, "PL/C ... the compiler for PL/I developed at Cornell University ... is widely used in teaching programming."[4] Similarly, a mid-late-1970s survey of programming languages said that "PL/C is a widely used dialect of PL/I."[5]
Origins and rationale
Work on this project was based on a prior Cornell compiler for the programming language CUPL, which in turn was influenced by the earlier Cornell language implementation CORC.[7] Both of these were small, very restricted languages intended for the teaching of beginning programming.[1] CORC had been used at Cornell from 1962 to 1966 and CUPL from 1965 to 1969.[8] Conway's group had been involved in the development of both of those efforts,[9][10] each of which attempted automatic repair of source code errors.[1]
As the 1970s began, Cornell was attempting to find a teaching language that had general commercial acceptance but also contained modern language features.
For educational institutions that did choose to use the language, the production
IBM supplied some of the funding for the initial PL/C development effort, which took place during 1968 and 1969,[8] with the "C" in the name standing for Cornell.[9] PL/C began being used on a regular basis in September 1970.[8]
Dialect and features
PL/C, a large subset of PL/I, eliminated a few of the more complex features of PL/I – record I/O, list processing, multitasking, and the compile-time preprocessor.[1] It added extensive debugging and error recovery facilities. PL/C was upwardly compatible with PL/I, meaning that a program that runs without error under the PL/C compiler should run under PL/I and produce the same results.[7] The only exception is if certain incompatible diagnostic features of PL/C were used. The PL/C compiler had the unusual capability of never failing to compile any program, through the use of extensive automatic correction of many syntax errors and by converting any remaining syntax errors to output statements.
PL/C provided extensions to PL/I's own CHECK
facility for flow tracing, and additionally provided new facilities, such as the PUT ALL;
and PUT ARRAY;
statements for printing the values of every scalar and every array variable at that point in the program.[14] PL/C also provided pseudo-comments, which could be used to conditionally turn on code based on options supplied in the PL/C job control card:
*PL/C ID='JANE SMITH' COMMENTS=(2) ... /*2 PUT SKIP LIST('AT POINT Y, THE VALUE OF POPULATION IS', POPULATION); */ /*4 PUT ALL; */ ...
The comments value shown here would result in the first PUT
statement being "uncommented" and invoked during the run, while the second one whose number did not match would still be a comment. Pseudo-comments also provided a way to use PL/C-specific statements in an upwardly compatible way with PL/I, as in the second case, since the PL/I compiler would see them as comments only.[14]
PL/C handles floating point arithmetic by computing all single-precision values as double precision, which can complicate attempts by the programmer to validate rounding behavior of particular computations.[17]
A simple example of PL/C's error repair has been presented as:[7]
PUT LIST (A B) ERROR SY06 MISSING COMMA ERROR SY07 MISSING SEMI-COLON PL/C USES PUT LIST (A, B);
While many cases such as this one can be successfully repaired, there are also cases where the repair does not achieve what the programmer likely intended.[1]
There were several other
Design and implementation
The implementation of the PL/C compiler itself was done in
The compilation speed of PL/C was quite good – some 10,000–20,000 sources lines of code per minute on an
PL/C was implemented as a
Use and distribution
As soon as it was ready, PL/C was distributed beyond Cornell itself,
PL/C quickly became the most popular of any education version of PL/I;[10] in 1970–71 alone, it was sent to 100 different institutions, resulting in 60 of them purchasing it.[8] By 1976, there were more than 200 sites around the world that had installed PL/C.[11][23] Eventually, over 250 universities had used it.[3] There was also some interest in PL/C from non-academic entities, thus resulting in PL/C adding support for some business-oriented features such as PICTURE variables.[6]
A survey conducted by New Mexico State University in 1972 looked at various possibilities for teaching languages and implementations and concluded regarding PL/C: "PL/C seems praiseworthy. Its purchase price ($1,800) is probably its biggest drawback. It has all of the built-in functions PL/I has, is much faster in both compilation and execution, and runs in 86K of a 100K partition leaving 14K for the student program. Its only real possible deficiency for student programs is its lack of record I/O capability. The PL/C compiler not only diagnoses errors, but often corrects them properly. It inserts missing parentheses and semicolons and shows both the invalid statement and the corrected statement. If PL/C finds a statement completely unrecognizable it deletes it and attempts execution anyway."[13]
Some universities, including Washington State University, found success in teaching an introductory class that used PL/C first and then Fortran (using WATFIV) second, which was found to be a beneficial order in terms of student learning.[24] Indeed, Cornell at one point restructured their introductory course offering to allow students the option to do that.[22]
PL/C release numbers were to some extent synchronized to releases of the IBM PL/I F compiler, so that for instance Release 4 of PL/C was intended to match Version 4 of the IBM F compiler in terms of upward compatibility.[16] In terms of some instances of PL/C distributions, Release 4 was available by January 1971;[16] Release 6 by August 1971;[1] Release 6.5 by November 1973;[25] Release 7.1 in March 1975;[26] and Release 7.5 in March 1976.[6] The last version of PL/C appears to have been Release 7.6, put out in 1977.[27]
Variants
Within the computer science department at Cornell there was a sense of pride about PL/C being associated with the university, and there were several variants of PL/C worked on by Conway, other faculty members, and graduate students.[28]
In 1974, the PL/CT variant of PL/C, for use on interactive terminals rather than in batch job submissions, was first made available at Cornell.
A variant under development by 1976 was PL/CS, which was a far more restricted subset of PL/I than regular PL/C and which provided direct language support for
A different implementation of the PL/CS definition came with Professor
There was an even more experimental dialect being worked on, starting in 1975,[35] that was known as PL/CV, which supplied some language support for formal proof of correctness and which ran as a separate verifier step.[11] The PL/CV work was led by Professor Robert L. Constable.[35][36] PL/CV used PL/CS as part of what it did,[35] and indeed Constable had participated in the creation of PL/CS,[11] especially working with Conway and David Gries on the adding of assertions.[36] A second version, PL/CV2, was released in 1978 and was presented at the Symposium on Principles of Programming Languages in 1979.[35]
Cross compilers
In the early 1970s, three cross compilers based on PL/C were created at the University of North Carolina; in these, the host platform was the IBM 360,[37] and the target machine was one of several minicomputers in use at the time. The PL/C language subset was used in these cross compilers,[38] as was the PL/C compiler's first two passes for syntax and semantic analysis.[39] However the IBM 360 code generation pass and storage allocation modules were replaced by ones specific to the target architecture.[39]
The first of these cross compilers was PLCV (not to be confused with the PL/CV verifier), a cross compiler for
The University of North Carolina used these cross compilers for real projects, not just education; in particular, PLCD was used in support of a
Textbooks
The textbook An Introduction to Programming: A Structured Approach Using PL/I and PL/C was written by Conway and Gries using PL/C as the programming language and was published in 1973.
A second edition was published in 1975.[41] Besides reorganizing some material on the development and testing of computer programs,[41] it incorporated changes due to Release 7 of the PL/C compiler.[42] A third edition was published in 1979 and, besides pitching the textbook material at a somewhat higher level to reflect that many college students had previous programming exposure in high school, incorporated additions to reflect the PL/CT and PL/CS variants of PL/C.[43]
An Introduction to Programming: A Structured Approach was used as the basis for several offshoot textbooks, sometimes with additional co-authors, that were either aimed at a more beginning level or that covered other languages or dialects.[44]
Legacy
PL/C was still in use at the beginning of the 1980s.[2][32] However, by then the Pascal programming language was beginning to come to the fore as a teaching language, and the move of student access towards smaller and more distributed computer systems than IBM mainframes also continued.[2][8] And PL/I itself never gained the dominance its designers had hoped for in either the business or scientific programming fields.[8]
At Cornell itself, the switch to using Pascal in its introductory computer programming classes took place during 1984.[45] Conway has said he does not know how long PL/C remained in use at the various sites where it was installed.[15]
In 2012, an effort was ongoing to resurrect the popular Michigan Terminal System and the software that ran on it as part of an archival effort on IBM 360/370 simulators. Among the things they requested was permission to run the PL/C object code, which was informally granted by those staff associated with it who were still at Cornell.[46]
As of 2022[update], the source for PL/C appears to have been lost.
See also
References
- ^ hdl:1813/5952.
- ^ .
- ^ a b Cornell University Announcements: Graduate School of Management, 1984–85. Cornell University. August 10, 1984. p. 22.
- ISBN 9780444002846.
- ^ S2CID 13509254.
- ^ a b c d e f Leavitt, Don (March 1, 1976). "PL/C Gains Interactive Version". Computerworld. p. 15.
- ^ .
- ^ a b c d e f g h i j Rudan, John W. (2005). The History of Computing at Cornell University (PDF). Ithaca, New York: The Internet-First University Press. pp. 48, 57, 62, 65–66, 86–87.
- ^ ProQuest 356759223– via ProQuest.
- ^ a b c "Cornell Department of Computer Science: 50 Years of Innovation". Cornell Bowers CIS. Retrieved September 15, 2022.
- ^ a b c d e f g Conway, Richard W.; Constable, Robert L. (November 1976). PL/CS – A Disciplined Subset of PL/I (Report). Cornell University. TR76-293.
- ^ .
- ^ S2CID 32179236.
- ^ ISBN 9780876264065. (Note the first edition uses "PL/1" on the cover but "PL/I" on the title page and in the text itself.)
- ^ a b c Conway, Richard W. (July 31, 2015). "A Conversation with Richard W. Conway". An Oral History of Computer Science (Interview). Interviewed by David Gries. Cornell University Library. See segments at 35:00 and 40:30.
- ^ a b c d "Availability of PL/C in MTS". Computing Center Newsletter. University of Michigan. January 21, 1971. p. 5.
- OCLC 3311037.
- S2CID 29890098.
- ^ Zeil, Steven. "Dealing with Error Messages". Department of Computer Science, Old Dominion University. Retrieved September 24, 2022.
- ^ Pratt, Terrence W. (1975). Programming Languages: Design and Implementation. Englewood Cliffs, New Jersey: Prentice-Hall. pp. 385–386, 415.
- ^ Dhotre, I.A.; Puntambekar, A.A. (2008). Systems Software. Technical Publications. p. 3-2.
- ^ .
- ^ a b c Palazzo, Michael (November 15, 1978). "Computer Dept. Wins Prominence Throughout U.S." The Cornell Daily Sun. pp. 1, 10, 11.
- .
- ^ See program listing image.
- ^ "New Version of PL/C". Computing Center Newsletter. University of Michigan. March 12, 1975. p. 2.
- ISBN 9780136073475.
- ^ Gries, David (July 21, 2015). "A Conversation with David Gries". An Oral History of Computer Science (Interview). Interviewed by Robert L. Constable. Cornell University Library. See segment at 28:30.
- ^ hdl:1813/7028.
- ^ a b Moore, Charles G. III; Worona, Steven L.; Conway, Richard W. (September 1975). PL/CT – A Terminal Version of PL/C – Release 2 (Report). Cornell University. TR75-259.
- ^ S2CID 7915928.
- ^ S2CID 14317073.
- ^ a b Teitelbaum, Tim (September 10, 2015). "A Conversation with Tim Teitelbaum". An Oral History of Computer Science (Interview). Interviewed by David Gries. Cornell University Library. See segments at 10:15 and 16:18.
- ISBN 9781461396239.
- ^ .
- ^ a b Constable, Robert L. (July 21, 2015). "A Conversation with Robert L. Constable". An Oral History of Computer Science (Interview). Interviewed by David Gries. Cornell University Library. See segment at 16:30.
- ^ a b ERDA Research Abstracts. Vol. 1 / #3. Oak Ridge, Tennessee: United States Energy Research and Development Administration. March 1976. p. 474. Entry 4422.
- ^ .
- ^ a b c d ERDA Research Abstracts. Vol. 1 / #2. Oak Ridge, Tennessee: United States Energy Research and Development Administration. February 1976. p. 311. Entry 2956; also entry 2957.
- ^ .
- ^ a b c "Computer Text Is Updated". The Ithaca Journal. June 30, 1975. p. 6 – via Newspapers.com.
- ^ See Second Edition, "Preface", p. xiv.
- ^ See Third Edition, "Preface", pp. xv–xvi.
- ^ "Texts by David Gries". Department of Computer Science, Cornell University. Retrieved September 23, 2022.
- ^ Compare Cornell University Announcements: Courses of Study, 1983–84. Cornell University. July 15, 1983. p. 261. with Cornell University Announcements: Courses of Study, 1984–85. Cornell University. July 16, 1984. p. 268.
- ^ "For *PLC". Michigan Terminal System Archive. April 3, 2012. Retrieved September 19, 2022.