[Oberon] Assumed issue in the Lola-2 compiler

Paul Reed paulreed at paddedcell.com
Mon Apr 15 15:32:52 CEST 2019


> ... I think the step where
> you enter r=15 into 'q = -(r + 1) / 16' is arbitrary.
> You could as well enter r=0 which also satisfies the relation, so
>          r = 0 -> q = -( 0 + 1 ) / 16 = -1 / 16 = 0
>          r = 15 -> q = -( 15 + 1 ) / 16 = -16 / 16 = -1
> This is undecidable from my point of view; correct me if I'm wrong.

Hang on, -1/16 is -0.0625 not 0.  (I agree there are indeed multiple 
integer solutions if you don't also add the range restriction on r.)  Or 
have I missed something?

Cheers,
Paul


More information about the Oberon mailing list