Re: PL/MIX



Allan Adler wrote:

In his Art of Computer Programming (2d ed, 1973), vol.1, p.152, Knuth writes:
"Actually MIX has two assembly languages: MIXAL, the machine-oriented
language which is designed to facilitate one-pass translation by a
relatively short assembly program, and PL/MIX, which more adequately
reflects data and control structures and which looks rather like the Remarks
field of MIXAL programs. PL/MIX will be described in Chapter 9."

I'm aware that Knuth's current efforts on extending the first 3 volumes
are based on a different computer model (MMIX instead of MIX), but let's
forget about that and remain in the context of Knuth's original plan for
the work. From the name, PL/MIX sounds as though it should be a variant
of PL/I implemented on the MIX machine. I don't know much about PL/I but
my impression is that it is a compiled language. At any rate, there are
compilers for it. On the other hand, Knuth's plan was for Chapter 9 to
deal with Lexical Scanning. Compilers weren't supposed to appear until
Chapter 12. So, it sounds as though Knuth really intended his PL/MIX to
be a kind of assembly language which could be adequately processed with
just lexical analysis.

Since I know so little about PL/I, I'm just wondering whether this
description of PL/MIX does sound like a variant of PL/I and, if so,
whether there is some free source code available for processing PL/I
programs along the lines that Knuth seems to be indicating for PL/MIX.

Also, suppose one knows the architecture of a certain computer and
one has an assembly language for that computer (such as Knuth's MIXAL
for MIX) and one wants to produce an analogue of PL/I (assuming that
PL/MIX really is such an analogue) for that architecture which resembles
Knuth's description of more adequately reflecting data and control structures
resembling the Remarks field of the assembly language programs. How does
one go about producing such a variant? I get the impression from Knuth's
book that this is (or was) a standard activity that must have been done
on a lot of architectures.

Indeed. Adding "structured programming" control structures to a
language is a simple exercise that has been repeated many times, using
macros, (for assemblers with adequate macro facilities,) or with
simple preprocessors for either assembly or higher level languages.

Adding complex data structures may be more difficult because it may
both require greater syntactic changes to the base language, and may
require more complex analysis and greater understanding of the base
language (by the preprocessor, adding control structures requires
almost none.) It is still something relatively easy to do.

On the other end of the simplicity spectrum, Objective-C, C++ and
others have been implemented as preprocessors to C.

So, maybe some of them are sufficiently well
documented that someone working on a modern PC running Linux can still
learn something from reading about them. If you can point me to relevant
examples, I would appreciate it. I'm not trying to implement a version of
PL/I on my PC. I'm interested in seeing something like the PL/MIX that Knuth
originally promised, even if he has abandoned it and even if I have to do it
myself.

Look at the Ratfor sources (Kernighan & Plauger's "Software Tools")
for a simple example, David Stes's "Portable Object Compiler" for a
more complex one.

I have a MIX simulator (for the original MIX, that works, as well as
one for MMIX that I haven't tried out yet), and I do hope that this PL/MIX
will run on it. I just need to know enough about the general idea to be
able to improvise with some confidence.

The group comp.compilers may be a better place for this question. I'm
cross-posting this reply there. (And that's why I'm also leaving the
original post in full.)

Roberto Waltman

[ Please reply to the group,
return address is invalid ]
.



Relevant Pages

  • Re: programing with science jobs
    ... to program in assembly language, 'C', and possibly Fortran or Basic. ... execution of a single instruction cycle on the processor. ... Usually programming languages are platform and operating system ...
    (sci.physics)
  • Re: on our resident dorks.....
    ... >>>Assembler is a low-level programming language that is closest to ... >>>machine language, while machine language is the direct 'instruction ... >>>Definition of assembly language:>A programming language that is one step away from machine language. ... >Each assembly language statement is translated into one machine>instruction by the assembler. ...
    (uk.politics.misc)
  • Re: HLA
    ... > Level Assembly language. ... HLA is almost totally proprietary. ... Mi certas ke miloj kaj miloj da popoloj scipovas la esperantan malgrau ...
    (alt.lang.asm)
  • Re: HLA
    ... > Level Assembly language. ... HLA is almost totally proprietary. ... Mi certas ke miloj kaj miloj da popoloj scipovas la esperantan malgrau ...
    (alt.lang.asm)
  • Re: I havent seen CLAX FAQs in a while
    ... Questions about the newsgroup? ... Assembly language code tips, tricks, and techniques. ... Graphics, sound, and other hardware programming ...
    (comp.lang.asm.x86)