Lemire Formally Verifies SIMD Base64 Codec Memory Safety in Lean 4
lemire · x · 2026-11-22
Daniel Lemire says he is increasingly formally verifying his high-performance code. It is early days, but he argues that adding formal proofs on top of extensive testing and validation could be a game changer.
His example is the phpbase64 repo: it ports simdutf's base64 decoders (SSSE3, AVX2, AVX-512 VBMI, NEON) into PHP's ext/standard/base64.c (php-src PR #25476) and includes a Lean 4 proof that the encoders and decoders never read or write outside their buffers, with tight bounds. The repo ships the PR code, a new test, AVX-512 VBMI build support, the full patch, and the Lean 4 development under formal/base64safety/.
More from coding & agent
- Company AI Brains Need Zoned Pruning: Archiving Stale Knowledge Is the Hard Part — annetgriffin · 2026-11-22
- Developer splits product UI for humans and agents, calls agents stickiest users ever — adamamcbride · 2026-11-22
- AI-built ThreeJS cell demo wows: draggable nucleus, burstable membrane, all in the browser — sebkrier · 2026-11-22
- 77-second explainer of Microsoft Intelligent Terminal: how any ACP agent plugs in — dfinke · 2026-11-22
- Non-developer builds desk kitten with Codex and M5Stack in 4 hours at OpenAI hardware hackathon — OpenAIDevs · 2026-11-22
- Dreamsy MCP turns Claude into a game engine that builds playable games in minutes — Spookie_Stunkk · 2026-11-22