# 让 LLM 证明解释器与语义一致

Original title: Ship Your Interpreter

> Hacker News story 50160440 · language: zh · submitted 2026-10-20
> Web version: https://zeli.app/zh/story/50160440
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 24 · by [gopiandcode](<https://news.ycombinator.com/user?id=gopiandcode>) · 💬 25
[original](<https://www.basis.ai/blog/ship-your-interpreters/>) · [HN discussion](<https://news.ycombinator.com/item?id=50160440>)

## Summary

随着 LLM 在发现软件漏洞方面能力日益增强，构建可验证软件变得至关重要。我们尝试让 LLM 为小型语言 WHILE 编写形式语义，并利用 Lean 证明该语义与编译后的解释器二进制文件行为完全一致。实验发现，即使语义通过了所有常规测试，仍可能因实现细节（如缓冲区限制）而存在偏差。通过‘发布你的解释器’这一思路，我们将解释器本身作为验证基准，确保生成的数学规则能精准描述程序运行行为，为大规模软件验证提供了新路径。

## Key quote

> 一个语义可以完美通过所有测试，却依然可能是错误的。

## HN discussion (25 comments)

### [ngruhn](<https://news.ycombinator.com/item?id=50177095>)

> 这太棒了。网上很多声称要“验证软件”的人，不过是跟 LLM 说句“验一下这个”，然后根本不知道输出的是什么。他们可能完全没意识到，模型证明的不过是 1+1=2 这种废话。
>
> 这几位倒是真展示了他们用 Lean 证明的定理。另外，把现有解释器编译成事实标准（de-facto spec）这个思路也很有意思。

### [ISackKnights](<https://news.ycombinator.com/item?id=50177266>)

> 我不确定自己刚才读了什么，因为 AI 生成的内容让我没能读完。但你不禁会想——这难道不就是 Rust 的一个子集吗？

### [jupitr](<https://news.ycombinator.com/item?id=50178376>)

> 这和元循环求值器（meta-circular evaluator）的不动点概念是一样的——也就是 Lisp 几乎完美建模的那种抽象理想语言。

---

## Cite

- Page: https://zeli.app/zh/story/50160440
- Date: 2026-10-20
- Source: basis.ai (https://www.basis.ai/blog/ship-your-interpreters/)
- Hacker News: https://news.ycombinator.com/item?id=50160440

## Other languages

- en: https://zeli.app/story/50160440 · markdown: https://zeli.app/story/50160440.md
- ja: https://zeli.app/ja/story/50160440 · markdown: https://zeli.app/ja/story/50160440.md
- ko: https://zeli.app/ko/story/50160440 · markdown: https://zeli.app/ko/story/50160440.md
- de: https://zeli.app/de/story/50160440 · markdown: https://zeli.app/de/story/50160440.md
- es: https://zeli.app/es/story/50160440 · markdown: https://zeli.app/es/story/50160440.md
- ru: https://zeli.app/ru/story/50160440 · markdown: https://zeli.app/ru/story/50160440.md
