| ▲ | giltho 8 months ago | |||||||
A common specification language is a very ongoing discussion, we just haven't managed to find an agreement yet. Things like `#[no_panic]` make sense, but it also doesn't require a spec language at all, the compiler already has support for these kinds of annotation and anyone could catch it. Though I cannot think of a single verification use case where all I want to check is the absence of panic. | ||||||||
| ▲ | nicce 8 months ago | parent | next [-] | |||||||
> single verification use case where all I want to check is the absence of panic. Basically any decoder/deserializer. It might be sufficient to handle the correctness in tests but panics are the most severe thing you want to avoid. How well `#[no_panic]` actually works in practice? There might be cases where e.g. index access violation never happen but compiler might still think that it happes. I could be impossible to restructure code without adding some performance overhead. | ||||||||
| ||||||||
| ▲ | littlestymaar 8 months ago | parent | prev | next [-] | |||||||
> Though I cannot think of a single verification use case where all I want to check is the absence of panic. Not for verification but in terms of ease of use, having no panic in a program means it would be fine and safe to have pointers to uninitialized memory (it's currently not because panics means your destructors can be run anywhere in the code, so everything must be initialized at all time in safe rust). | ||||||||
| ▲ | imtringued 8 months ago | parent | prev [-] | |||||||
One more case where the halting problem adds more confusion than it helps. The halting problem is equivalent to the acceptance problem, which is equivalent to the reachability problem. >Though I cannot think of a single verification use case where all I want to check is the absence of panic. You can reduce any static verification task to a check for a condition that produces a panic. In short, sprinkle your pre, post and intermediate conditions all over your code in a way that produces a panic (known as asserts) and the tool will do the heavy lifting. | ||||||||