There&#x27;s methods for handling that safely even down to assembler language or gates. Quite a few. FLINT was first I saw. There&#x27;s also SPARK with integrity checks that assume hardware or something else might goof. Chlipala&#x27;s Bedrock can emulate some of it. Microsoft came up with one, Vx86, for their VCC verification system that they applied to Hyper-V. They also did CoqASM and used TAL in VerveOS.<p>So, all kinds of methods of getting some guarantees out of unsafe code that can be paired with safe HLL&#x27;s like Haskell.