Incorrect result from signed right-shift when using Code_Target_Numeral

Florian Haftmann florian.haftmann at cit.tum.de
Tue Dec 16 19:08:53 CET 2025


For the record:

>>> Right now our main problem is that 64eb08b0a4bc is on top of "latest" 
>>> Poly/ML development and experiments. Thus it does not quite work for 
>>> Isabelle yet, especially HOL-Codegenerator_Test. For the release the 
>>> change needs to sit on top of official v5.9.2.
>>
>> I now see 638379c583a5, and that looks fine so far in a quick test of 
>> HOL-Codegenerator_Test ...
> 
> It is interesting that this remained undiscovered – AFP session 
> Native_Word contains considerable tests for code generation for word types.

In https://isabelle.in.tum.de/repos/isabelle/rev/490ffe526eeb that 
situation is now explicitly checked.

My statement concerning word types was misleading – the example does not 
use target language word types but a generic word type which is 
implemented by integers, where the target language operation for right 
bit shift obviously was not implemented correctly in the underlying system.

Cheers,
	Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xA707172232CFA4E9.asc
Type: application/pgp-keys
Size: 25429 bytes
Desc: OpenPGP public key
URL: <https://mailman46.in.tum.de/pipermail/isabelle-dev/attachments/20251216/d0854b3f/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <https://mailman46.in.tum.de/pipermail/isabelle-dev/attachments/20251216/d0854b3f/attachment-0001.sig>


More information about the isabelle-dev mailing list