[Oberon] Assumed issue in the Lola-2 compiler

rochus.keller at bluewin.ch rochus.keller at bluewin.ch
Tue Apr 16 15:14:02 CEST 2019

@  Chris Burrows:

Thank you for the detailed explanations. I understand your reasoning. As mentioned I've found a viable work-around so this is only for theoretical interest.

>>I don't see how you could come to that conclusion.
If I reformat the equation like this, which is what I actually need to implement the operation:
x = q*y + r -> x - r = q * y -> ( x - r ) / y = q, therefore q = x DIV y = ( x - r ) / y
we could get q=0 with arguments x=-1 and y=16 also if r=0.
In your reasoning you assume that x, y, q and r have to be arithmetic integers at any time. But is this assumption really valid? What in the Oberon report keeps me from assuming that only the "steady state" requires arithmetic integers but intermediate results could be rational numbers which are then rounded towards zero (as e.g. explicitly required by the C/C++ standard)?

>> The definition in the Oberon Report is necessary and sufficient.
Maybe it is in a pure mathematical sense and I just don't get it because I'm not a Mathematician or otherwise mentally retarded; but - if true - is the language report nevertheless suitable for use if seven very well educated people still have to exchange dozens of posts with seemingly valid interpretations of the same language report? 


More information about the Oberon mailing list