27

A 1980 paper called "Register Allocation via Coloring" contains something that looks like source code:

P: PROC(MODE);

 DCL

    MODE     BIT(1),

    (A1,A2,A3,A4,A5,A6,A7,A8,A9,A10,
     B1,B2,B3,B4,B5,B6,B7,B8,B9,B10,
     SUM)         FIXED BIN(15) AUTO,

    (U(10),V(10)) FIXED BIN(15) STATIC EXT;

  IF MODE
     THEN DO;
        A1=U(1); A2=U(2); A3=U(3); A4=U(4); A5=U(5);
        A6=U(6); A7=U(7); A8=U(8); A9=U(9); A10=U(10);
     END;
     ELSE DO;
        B1=V(1); B2=V(2); B3=V(3); B4=V(4); B5=V(5);
        B6=V(6); B7=V(7); B8=V(8); B9=V(9); B10=V(10);
     END;

  LABEL:;

  IF MODE

Original image

I couldn't find what programming language this is. Is it a real historical programming language, or is it some type of pseudo-code?

The beginning of the paper mentions that the research is based on a PL/I Compiler. So maybe it's the programming language that the compiler was built on. I couldn't locate the paper where it talks about the compiler on the Internet.

  • 2
    @AndrewT - (edits to title) LABEL in this context (before a colon) is not a keyword, it's a label. It would be a keyword in a LABEL declaration. That's one of the 'interesing' things about PL/I: keywords are not reserved words. – another-dave May 13 at 11:55
58

It's PL/I, promoted by IBM as the successor to FORTRAN, Algol 60, and COBOL. That's actual code as far as I recall, not pseudocode.

PL/I had abbreviations for keywords; "DCL" is "DECLARE".

It starts off by defining a procedure (routine) named P with one parameter, named MODE, which is a Boolean variable - BIT(1), then defines a bunch of 16-bit signed integers allocated on the stack, and some statically-allocated arrays.

| improve this answer | |
  • 1
    Comments are not for extended discussion; this conversation has been moved to chat. – Chenmunka May 12 at 17:06
  • 1
    Also conceivable that it's PL/M, Gary Kildall's microcomputer version of PL/I. But given that they mention PL/I in the paper, it seems likely that it's PL/I. – Ben Crowell May 12 at 19:17
  • 4
    Given that all the authors worked for IBM at the Watson Research Center, I'd say it's certain it's PL/I. – another-dave May 12 at 23:00
  • The PL/M I used was the Intel variant. It didn't have any abbreviated keywords. Certainly not anything that looked like this. – cup May 16 at 15:54
  • PL/1 was weird - it always generated an executable, even when there were compilation errors. You'd wonder why your program was giving the wrong results and then discover that there was a compilation error which caused the logic to go wrong. – cup May 20 at 8:43
0

I know that SAS statistical software utilises those three things. I guess you would call it a pseudocode?

PROC is a command for 'ready to use' procedures, like proc tables, proc univariate, etc.

Using a LABEL statement in a DATA step permanently associates labels with variables by affecting the descriptor information of the SAS data set that contains the variables.

The DCL (DECLARE) statement declares a variable of any SCL (SAS Component Language) data type.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.