跳到正文
原文
Boris Cherny· @bcherny · X·· 10 天前AI 评分51
AI 导读

Boris Cherny 用 Opus 5.5 通过 Lean 对 Claude Agent SDK 做形式化验证,几个简短提示词就得到 16 个修复各类 bug 和竞态条件的 PR。他表示自己不熟 Lean 和 TLA+,但 Claude 两者都很擅长,常把两者结合检查数据流、并发和状态管理问题,并追问形式化验证是否是找 bug 的未来方向。

正文

I used Opus 5.5 to formally verify the Claude Agent SDK using Lean. A couple short prompts = 16 PRs fixing various bugs and race conditions. Video attached.

TLA+ also works well. I sometimes combine Lean and TLA+ to look for issues around data flow, concurrency, and state mgmt.

I don't know either language well, but Claude is excellent at both. This approach is super useful for formally modeling your code and finding bugs that a human probably wouldn't have spotted.

Is formal verification the future of coding (or at least, bug finding)?

来源:Boris Cherny · x.com