[Oberon] Module aliases - what is the correct way to handle them
andreas_pirklbauer at yahoo.com
Wed Feb 19 10:27:58 CET 2020
Just as an addendum to your proposed solution (ORB06):
Below are the two cross-combinations that you have removed relative to the version which checks all 4 possible combinations (as in ORB08 of http://github.com/andreaspirklbauer/Oberon-test-module-aliases)
1. The first cross-combination (obj.orgname # name) can indeed be ignored, as it safely allows:
MODULE B10; IMPORT X := M0, M0 := M1; END B10. (*obj = X (=M0) => obj.orgname = M0, name = M0*)
MODULE B11; IMPORT M := M0, M0 := M; END B11. (*obj = M (=M0) => obj.orgname = M0, name = M0*)
2. The second cross-combination (obj.name # orgname) can also be ignored, as it safely allows:
MODULE B12; IMPORT M0 := M, X := M0; END B12. (*obj = M0 (=M) => obj.name = M, orgname = M0*)
In all these cases (B10, B11, B12), these can be seen as legal and also can be handled by the FPGA Oberon data structure.
The only remaining question seems to be whether can/should improve the error messages in some cases.
More information about the Oberon