logoalt Hacker News

quietusmurisyesterday at 5:04 PM1 replyview on HN

Interesting. Do I have to write specs in Lean against the Wasm semantics or can you annotate Rust directly?


Replies

mfornettoday at 12:36 PM

Both.

You can write "annotate" your rust code using asserts. On the wasm side asserts are converted to trap instructions, so the Lean spec will simply be: For every input this code never traps.

Part of our focus is making sure that specs are both easy to write and read, since they are human facing. Eventually you could imagine how writing code will mostly be writing specs, and both the code and the proofs will be handled by AI agents. In this scenario it is very important that humans can easily audit and modify the specs.

show 2 replies