Ship Your Interpreter:用 LLM 生成形式语义并用 Lean 证明解释器正确性
Ship Your Interpreter
作者让 LLM 为一门小型编程语言写出精确的数学规则(形式语义),再用 Lean 证明该语言的解释器在编译为 RISC-V 低级指令后仍符合这些规则。评论者指出首段由 LLM 撰写,并质疑文章对解释器、形式证明、汇编等术语逐一定义的受众定位。
> We had LLMs write precise mathematical rules, or a formal semantics, for how a small programming language should behave. We then used Lean, a tool for checking mathematical proofs, to prove that the interpreter—the program that runs code written in that language—follows those rules even after being compiled into low-level instructions understood by a RISC-V computer chip.
who is your audience? why are you defining every single term here? perhaps i am less tenacious than most, but i wouldn't expect many who are unfamiliar with interpreters, formal proofs, or assembly language to be willing to charge on ahead—even when armed with that additional context.
also, writing your very first paragraph via LLM is certainly a choice.
来源:Hacker News · 首页 · news.ycombinator.com