Module aliases - what is the correct way to handle them
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/S... http://github.com/andreaspirklbauer/Oberon-test-module-aliases/blob/master/S... 2. One-pass solution: (+40 lines more than FPGA Oberon) http://github.com/andreaspirklbauer/Oberon-test-module-aliases/blob/master/S... 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.
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@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/S...
http://github.com/andreaspirklbauer/Oberon-test-module-aliases/blob/master/S...
2. One-pass solution: (+40 lines more than FPGA Oberon)
http://github.com/andreaspirklbauer/Oberon-test-module-aliases/blob/master/S...
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@lists.inf.ethz.ch mailing list for ETH Oberon and related systems https://lists.inf.ethz.ch/mailman/listinfo/oberon
participants (2)
-
Andreas Pirklbauer -
Luca Boasso