Robert Penner (@robertpenner) header
Robert Penner (@robertpenner) profile picture

UX Engineer @Microsoft | creator of those easing functions | building next-gen motion & graphics tools | formal verification, Lean, Dafny, Bend2

Brooklyn, NY
Joined October 2008
Photo by Robert Penner (@robertpenner)Photo by Robert Penner (@robertpenner)Photo by Robert Penner (@robertpenner)Photo by Robert Penner (@robertpenner)Photo by Robert Penner (@robertpenner)Photo by Robert Penner (@robertpenner)Photo by Robert Penner (@robertpenner)Photo by Robert Penner (@robertpenner)Photo by Robert Penner (@robertpenner)Photo by Robert Penner (@robertpenner)
Rewind me 6 months and tell me LemmaScript will be used to formalize and uncover bugs in XState. I would have believed you, actually. There's a reason we built it, iterated relentlessly, and stuck with it through a dead zone. Be like Robert. Go formalize stuff.
Replying to @robertpenner
Now I'm tackling something more ambitious: formalizing XState's runtime behavior with LemmaScript. I started with XState's lightweight FSM, proving 31 laws governing state transitions, context updates and sequences of events. Comparing the formally verified model against XState's implementation helped uncover two bugs, both since fixed upstream. That led me deeper into XState's runtime. In my first week, I filed 7 bug reports involving subtle problems with transitions, event ordering and state behavior. It's exciting to see formal verification help uncover bugs in a mature, widely used open-source library.
1
1
5
458
【Gemini 4 Carbon】震惊!一场跨越6000多年的鹈鹕骑车测试作品 这真的是我见过的,最最最最牛逼的鹈鹕骑车测试:
63
56
22
663
56,722
Robert Penner retweeted
Our long-term goal is scalable autoverification of all future software. A first step is out today: an executable Lean model of the Linux kernel's WireGuard handshake, derived from its C source. We aim to prove that code is correct. math.inc/position
4
38
9
245
20,496
Robert Penner retweeted
Since it seems that formal verification is going viral again, I might as well drop what I have been working on the side-ish for the past 2.5 weeks over weekends. here is Janus: a Lean 4 framework that formally verifies compiled Go machine code. Not the Go source, the actual arm64 and amd64 bytes the CPU runs. I already ran on a target successfully: holiman/uint256, the 256-bit math library under go-ethereum. All 146 exported functions are proven correct on both arm64 and amd64: 293 machine-checked theorems covering arithmetic, modular math, Exp, Sqrt, parsing and JSON/SSZ/RLP encoding. Each one says: for every valid input, this machine code returns exactly what the spec says. How it works: 1. Compile the Go code and pull the function's machine code out of the real binary. 2. Write a short, readable spec in Lean, e.g. "z = x + y mod 2^256". 3. Prove the machine code meets it, instruction by instruction, on a Lean model of the CPU. 4. Lean's kernel checks every step of the proof. Incredibly enough it found real bugs in the library's latest releast. e.g uint256's Float64() truncates instead of rounding to the nearest value, as its documentation promises. It also turned up several places where the docs/expected behaviour and the ACTUAL behaviour disagreed. Janus can also prove things about performance: uint256's Add executes exactly 17 instructions on both arm64 and amd64, on every call and that has an upper-bound proof/spec. Every uint256 spec (plain Lean, one file per function): github.com/Giulio2002/fv-uin… Full list of findings: gist.github.com/Giulio2002/0… Code: github.com/Giulio2002/Janus Proofs: github.com/Giulio2002/fv-uin…
11
8
2
115
4,410