[Oberon] Module aliases - what is the correct way to handle them

Luca Boasso luke.boasso at gmail.com
Mon Feb 17 03:45:53 CET 2020


Hi Andreas,

I made an additional comment about cyclic imports at
http://github.com/andreaspirklbauer/Oberon-test-module-aliases/issues/1
Thank you for exploring alternative implementations!
I like the improvements in ORB12.Mod and ORB13.Mod, but they are still
quite complex. I think that the use of local and global module tables is
still simpler, in addition it should produce smaller symbol files: in FPGA
Oberon re-exporting types will always lead to writing the module name (and
key).
With a global module table the module name (and key) is only written once
regardless of how many types we are re-exporting from that module.


On Sun, Feb 16, 2020 at 3:19 PM Andreas Pirklbauer <
andreas_pirklbauer at yahoo.com> wrote:

> Luca,
>
> as per our (off-list) discussion, the following compilers now also compile
> your programs M0 and M7 below:
>
> 1. Two-pass solution: (+25 lines more than FPGA Oberon)
>
>
> http://github.com/andreaspirklbauer/Oberon-test-module-aliases/blob/master/Sources/ORB12.Mod
>
>
> http://github.com/andreaspirklbauer/Oberon-test-module-aliases/blob/master/Sources/ORP12.Mod
>
> 2. One-pass solution: (+40 lines more than FPGA Oberon)
>
>
> http://github.com/andreaspirklbauer/Oberon-test-module-aliases/blob/master/Sources/ORB13.Mod
>
> Thanks for your great input on:
>
>
> http://github.com/andreaspirklbauer/Oberon-test-module-aliases/issues/1
>
> -ap
>
>
>    > oberonc <https://github.com/lboasso/oberonc> implements the module
> systems
>    > based on the ideas of  "On the Linearization of Graphs and Writing
> Symbol
>    >Files (1991)” <
> http://e-collection.library.ethz.ch/eserv/eth%3A3310/eth-3310-01.pdf>
>    >
>    > The following example compiles and run:
>    >
>    > MODULE M0;
>    >   TYPE T0* = RECORD i: INTEGER END ;
>    > END M0.
>    >
>    > MODULE M7;
>    >  IMPORT Y := M0, M0, X := M0,
>    >     S1 := SYSTEM, S2 := SYSTEM;
>    > VAR a: Y.T0;
>    >     b: M0.T0;
>    >     c: X.T0;
>    >     i: INTEGER;
>    >  BEGIN
>    >    a := b;
>    >    c := a;
>    >    i := S1.VAL(INTEGER, {1});
>    >    i := S2.VAL(INTEGER, {2})
>   > END M7.
> --
> Oberon at lists.inf.ethz.ch mailing list for ETH Oberon and related systems
> https://lists.inf.ethz.ch/mailman/listinfo/oberon
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.inf.ethz.ch/pipermail/oberon/attachments/20200216/83ca1071/attachment.html>


More information about the Oberon mailing list