Re:When AI Writes the Software, Who Verifies It?
by dranov on Tuesday March 03, 2026 @07:41PM
(#47241400)
Cedar used to be written in Dafny, but AWS abandoned that implementation and rewrote it in Lean.
https://aws.amazon.com/blogs/opensource/lean-into-verified-s...
Re:When AI Writes the Software, Who Verifies It?
by muraiki on Tuesday March 03, 2026 @09:19PM
(#47242173)
Oh whoops, thank you for the correction! I didn't realize that.
Re:When AI Writes the Software, Who Verifies It?
by cpeterso on Tuesday March 03, 2026 @09:18PM
(#47242163)
Looks like LLMs also find Dafny easier to write than Lean. This study, “A benchmark for vericoding: formally verified program synthesis”, reports:
> We present and test the largest benchmark for vericoding, LLM-generation of formally verified code from formal specifications … We find vericoding success rates of 27% in Lean, 44% in Verus/Rust and 82% in Dafny using off-the-shelf LLMs.
Re:When AI Writes the Software, Who Verifies It?
by nextos on Tuesday March 03, 2026 @11:13PM
(#47242977)
Not surprising, as Dafny is a bit less expressive (refinement instead of dependent types) and therefore easier to write. IMHO, it hits a very nice sweet spot. The disadvantage of Dafny is the lack of manual tactics to prove things when SAT/SMT automation fails. But this is getting fixed.
Re:When AI Writes the Software, Who Verifies It?
by JuniperMesos on Wednesday March 04, 2026 @04:43AM
(#47245222)
There's multiple Lean tutorials, some of which are more mathy than others. One of the things I like about Lean is precisely that it's an ordinary, Haskell-style functional programming language in addition to having all the Curry-Howard-isomorphism-based mathematical proof machinery. You can write `cat` in Lean.
The Dafny code formed a security kernel at the core of a service, enforcing invariants like that an audit log must always be written to prior to a mutating operation being performed. Of course I still had bugs, usually from specification problems (poor spec / design) or Claude not taking the proof far enough (proving only for one of a number of related types, which could also have been a specification problem on my part).
In the end I realized I'm writing a bunch of I/O bound glue code and plain 'ol test driven development was fine enough for my threat model. I can review Python code more quickly and accurately than Dafny (or the Go code it eventually had to link to), so I'm back to optimizing for humans again...