‹ BackHN Continuity

Thread

Developing provably correct Rust code with Verus

164 points · 79 comments · Betelbuddy

  1. sourdecor · · focus · HN ↗
    Verus seems to be exactly what I have been looking for! I discovered AllConcur[0] on HN a while back, and I wanted to port it to Go, but since it used TLA+ and C, and it was very confusing for me to understand how you can trust the implementation unless you can compile TLA+ to C.

    I was talking to Gemini about comparing Verus to TLA+ and it said that TLA+ is usually used (for example) "to prove that a distributed consensus protocol is logically sound" but when I asked if Verus can do that too, it said yes. So Verus can be compiled and integrated with Rust, whereas TLA+ is used more for blueprint development that then guides the implementation in the mind of the implementer.

    Seems awesome!

    [0]: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12357976">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=12357976

    1. jgalt212 · · focus · HN ↗
      &gt; as very confusing for me to understand how you can trust the implementation unless you can compile TLA+ to C.

      Preach. I feel like I&#x27;m taking crazy pills every time someone claims TLA+ as the sine qua non of provably correct systems. They should sub probably for provably.

      1. digilypse · · focus · HN ↗
        Isn’t the value in being able to verify the design before implementing? It would be more ideal surely to prove correctness of the deployed code, but I still find it very useful.
        1. jgalt212 · · focus · HN ↗
          &gt; Isn’t the value in being able to verify the design before implementing?

          Fair enough, but to be truly safe you really need the whole pipeline connected. model -&gt; validation -&gt; emitted code.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.