Hacker News new | ask | show | jobs
by Taikonerd 13 days ago
> A great example of this is the recent "binary verification" approach, where instead of proving facts about the programs themselves, we prove facts about the compiled binaries of those programs.

This is an interesting argument; I can see pros and cons here.

I'm not a formal-methods guy, but I'd imagine the reason that you might want to prove facts about the programs themselves is that they encode higher-level information "for free" -- such as, this function returns a Person.

IIRC, there was research into special compilers that would produce TAL: Typed Assembly Language. The idea was that TAL could carry annotations that would be helpful to provers.

3 comments

As far as I understand, the binary-level verification lifts high level specifications to simpler binary-level specifications. For instance, imagine a simple property:

```rust fn prop(a: X, b: X) -> bool { a == b } ```

You prove that the compiled `prop` function will always return `bool`, which might be that a particular register gets written `1` after every call to `prop`. Maybe TAL would allow for more complex properties to be written at the binary level instead of doing this trick.

Exactly. Binary verification can often struggle with problems that are completely trivial when looking at the source code. For example "where can this indirect JMP jump to?" requires full-program analysis and may worst-case require solving the halting problem, but "what code can execute when I invoke this trait function?" is easy.
> > A great example of this is the recent "binary verification" approach

This is not that recent. The sel4 proof uses this, to be able to use a compiler that's not verified