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.