ArticleslgStudy

computer science

PL/C

PL/C is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand PL/C rather than just read about it. In short: 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.

PL/C — main illustration
PL/C — illustration

Key takeaways

  • PL/C belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect PL/C to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of PL/C from memory before moving on to harder problems.

Reference excerpt

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. 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. Over 250 other universities adopted PL/C; 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." Similarly, a mid-late-1970s survey of programming languages said that "PL/C is a widely used dialect of PL/I."

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. Both of these were small, very restricted languages intended for the teaching of beginning programming. CORC had been used at Cornell from 1962 to 1966 and CUPL from 1965 to 1969. Conway's group had been involved in the development of both of those efforts, each of which attempted automatic repair of source code errors. As the 1970s began, Cornell was attempting to find a teaching language that had general commercial acceptance but also contained modern language features. As another Cornell computer science professor, David Gries, wrote at the time, the first criterion effectively eliminated the ALGOL family of languages and the second criteria argued against FORTRAN and BASIC (with COBOL not even being considered); thus, they chose PL/I. While PL/I did have a foothold in educational use, the decision went against the grain of most universities, where one survey found that some 70 percent of American college students were being taught with FORTRAN. However, Cornell was intent on having a language useful for showing computer science principles and best engineering practices and through which methods such as structured programming and stepwise refinement could be taught, and PL/I was a more expressive vehicle for that than FORTRAN. For educational institutions that did choose to use the language, the production IBM PL/I F compiler then available was much too slow, in both compile time and execution time, for its use to be practical for student programs. A similar situation existed for FORTRAN, where the IBM FORTRAN IV G compiler was too slow and the University of Waterloo's WATFOR implementation had become a very popular alternate solution. So there was an opening for a student compiler for PL/I; indeed, IBM recognized this and contacted Cornell and suggested they make a 'WATFOR for PL/I'. Indeed, this simile would be made explicit; as one university would explain to their computer center users, "PL/C is to PL/I what WATFOR is to FORTRAN IV, a fast compile-and-go system with some batching capabilities intended primarily for student use." IBM supplied some of the funding for the initial PL/C development effort, which took place during 1968 and 1969, with the "C" in the name standing for Cornell. PL/C began being used on a regular basis in September 1970.

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. 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. 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. 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. 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. A simple example of PL/C's error repair has been presented as:

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. There were several other education-related PL/I compilers, including PLAGO from the Polytechnic Institute of Brooklyn and SP/k from the University of Toronto, however they tended to use much more restricted subsets of PL/I, whereas PL/C supported almost the entire language. And PL/C was the only PL/I educational dialect mentioned in languages expert Jean E. Sammet's extensive survey of programming languages in use for 1976–77.

Design and implementation

… excerpt ends here. Continue reading the full article.

Illustrations

PL/C: PL/C came from Cornell University's Department of Computer Science, located in Upson Hall on the Engineering Quadrangle[6] (building on center-left with yellow bands, here seen in the 1990s)
PL/C came from Cornell University's Department of Computer Science, located in Upson Hall on the Engineering Quadrangle[6] (building on center-left with yellow bands, here seen in the 1990s)
PL/C: Line printer listing of PL/C program, from a Cornell first-semester programming class in 1973
Line printer listing of PL/C program, from a Cornell first-semester programming class in 1973
PL/C: Assignment using PL/C, from a Cornell second-semester programming class in 1974
Assignment using PL/C, from a Cornell second-semester programming class in 1974
PL/C: PL/C program and data card deck, run at Cornell in 1976 for a numerical analysis research task
PL/C program and data card deck, run at Cornell in 1976 for a numerical analysis research task

Worked examples

Example 1 — a first encounter with PL/C

Start with the simplest possible case. Write down what PL/C claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to PL/C before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about PL/C ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of PL/C

In research
PL/C appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses PL/C in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
PL/C is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cornell University, Educational programming languages, IBM mainframe software, so understanding it makes those chapters shorter.
In everyday life
Look for PL/C outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study PL/C in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what PL/C means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain PL/C out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is PL/C in simple terms?

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.

Why does PL/C matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study PL/C?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on PL/C.

Tags

  • Cornell University
  • Educational programming languages
  • IBM mainframe software
  • PL/I programming language family
  • Procedural programming languages
  • Programming languages created in 1970
  • Software programmed in assembly language
  • Structured programming languages

Keep exploring