Path: utzoo!utgpu!attcan!uunet!steinmetz!davidsen
From: davidsen@steinmetz.ge.com (William E. Davidsen Jr)
Newsgroups: comp.arch
Subject: Re: Software Distribution
Message-ID: <11892@steinmetz.ge.com>
Date: 18 Aug 88 15:15:24 GMT
References: <891@taux01.UUCP>
Reply-To: davidsen@crdos1.UUCP (bill davidsen)
Organization: General Electric CRD, Schenectady, NY
Lines: 37

In article <891@taux01.UUCP> chaim@taux01.UUCP (Chaim Bendelac) writes:
| Previous articles (under "Standard Un*x HW"/"Open Systems"/"ABI", etc) have
| expressed the wish for portability standards. Many organizations are spending
| tremendous resources to promote such standards. Nothing new there.
| 
| I wondered, if there is no room for another standard layer, specially 
| designed for software DISTRIBUTION.  Imagine an Intermediate Program 
| Representation Standard (IPRS) along the lines of an intermediate language
| within a compiler.  Language independent, architecture independent.
| The distributor compiles and optimizes his program with his favorite 
| language compiler into its IPR, copies the IPR onto a tape and sells. 
| The buyer uses a variation on 'tar' to unload the tape and to post-process 
| the IPR program with the system-supplied architecture-optimized IPRS-to-binary 
| compiler backend.

  This has been done before. The "UCSD Pascal" system was done this way,
and Fortran (and I think Ada) compilers were created to generate the
P-code (pseudo code).

  The original version of B I saw worked this way, and you could either
interpret or compile to binary. The compile cycle was (a) 2 pass compile
to P-code, (b) global machine independent optimize of the P-code, (c) 2
pass compile to assembler, (d) peephole optimize the assembler source,
and (e) two pass assembler.

  This was slow, but it produced some very good code, and the
interpreter actually ran fairly well after (b). The interpreter
translated the text tokens into two byte strings before execution, so it
was useful if not blindingly fast.

  As we got it, B didn't have the optimizers, but I added them when I
was creating a derivetive language, IMP, which used the same P-codes. A
version of this for CP/M-*) was floating around the BBS's called IL/1.
-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me