News for hackers. Stuff that matters.
Re:Dafny: Verification-Aware Programming Language by doonesbury on Thursday July 30, 2020 @01:01PM (#24000465)
This .... This kind of approach could and should replace rust. That is, if the language developers are interested in commercial adoption a sweet spot is a memory safer c++. Rust has that going on but it'll never make it as a truly safe language in memory and other aspects without specification and verification. I'm arguing real progress may include rust like impulses but can't be complete without built in tla+ or other formal tool support
Re:Dafny: Verification-Aware Programming Language by dwohnitmok on Thursday July 30, 2020 @01:10PM (#24000582)
TLA+ operates at a different level both conceptually and in the SDLC than programming languages like Dafny or Rust. TLA+ is a design language rather than an implementation language and this permeates a lot of its foundations.

FWIW you can already use Dafny to write individual modules in real-world programs (it compiles to .NET and therefore interoperates with e.g. C#), although there are still some rough edges given the tiny size of its community, and the documentation for doing this is rather fragmentary.

As for the difference between Dafny and Rust, Rust really has only one big unique trick up its sleeve which is its affine types. Otherwise its approach is entirely compatible with Dafny's (and indeed there are efforts to port over some the same ideas between Dafny to Rust, see e.g. https://alastairreid.github.io/rust-verification-tools/). Those will take a long time though to come to fruition because formal verification is still a hard problem.

Re:Dafny: Verification-Aware Programming Language by MaxBarraclough on Thursday July 30, 2020 @01:55PM (#24001107)
It wasn't a mistake for Rust not to emphasise formal verification. Going that route would have been very restrictive. Rust is aiming to offer a safer alternative to C, not a more approachable formally verifiable language.

That said, it looks like the good ideas from Rust may find their way into SPARK, a highly restrictive programming language for critical systems development with formal verification. [0][1]

[0] https://www.adacore.com/papers/safe-dynamic-memory-managemen...

[1] https://arxiv.org/abs/1805.05576

Re:Dafny: Verification-Aware Programming Language by zozbot234 on Thursday July 30, 2020 @03:06PM (#24001774)
> This kind of approach could and should replace rust.

Rust could definitely be augmented with formal verification; it's just that this requires more research into semantics for Rust itself and Rust-like languages - especially wrt. the 'unsafe' subset.

Re:Dafny: Verification-Aware Programming Language by chriswarbo on Friday July 31, 2020 @06:46AM (#24007392)
If you're interested in a C/Rust-level language which supports verification, maybe take a look at ATS http://www.ats-lang.org