[Oberon] Oberon-1 or Oberon-2?

chris chris at gcjd.org
Tue Oct 14 11:54:24 CEST 2014


On Mon, 13 Oct 2014 21:48:36 -0400, skulski at pas.rochester.edu wrote:
> I read NW book on compiler construction, but it did not help me in
> understanding either one. Seriously, I vaguely remember that OP2
> introduced the intermediate code representation that helped optimize the
> emitted opcodes. Please correct me if I am wrong. I am not trying to
> insist we need this. I hope that experts can comment.

Yes you are right. The OP2 generates an intermediate representation in 
a tree and afterwards the independent code generator traverses the tree.

Documentation is in:
ftp://ftp.ethoberon.ethz.ch/Oberon/OberonV4/Docu/OP2.Paper.ps.gz
ftp://ftp.inf.ethz.ch/pub/publications/tech-reports/1xx/125.pdf

Also ETH Dissertation 10650 from Crelier has a chapter about OP2.

The complexity is considerable higher than in an immediate one pass code
generating compiler.

> Oberon-2 "extensions" is another matter. I believe these are not
> extensions but important features. I have extensive experience with
> Oberon-2 and Component Pascal. I also wrote a graphics system with
> System-3 Gadgets, which I later converted to Component Pascal. (This
> graphics is still being used in one of the most advanced physics
> experiments of our times.) Based on this experience I believe that
> Oberon-2 helps with writing better, more reliable code. It is a pity that
> Oberon-2 is not available under the FPGA Oberon System. Perhaps it was
> more convenient to do so, but I think it was a mistake.

In my opinion it is not too difficult to add the Oberon-2 extensions to 
the simple one pass compiler. Managing the OP2 and writing a new 
backend is more difficult if you have to learn OP2 from scratch.

Greetings

Christian



More information about the Oberon mailing list