comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Rust's temporal safety for Ada/SPARK
Date: Sun, 14 May 2017 19:18:45 +0200
Date: 2017-05-14T19:18:45+02:00	[thread overview]
Message-ID: <ofa3hm$ff7$1@gioia.aioe.org> (raw)
In-Reply-To: 1c0e2c7c-4fd6-43d1-9848-f03e1a72bcb3@googlegroups.com

On 2017-05-14 18:46, digitalkevlar@gmail.com wrote:

> Niklas Holsti's post shows he understands what capability I'm 
> describing. Rust code can be shown free of double-free's and 
> dangling-pointers at *compile-time* with *no runtime checks or GC*.
> It does it with just a few simple rules. Here's the simplest,
> shortest description I could find to save you all time: >
 > 
https://stackoverflow.com/questions/36136201/how-does-rust-guarantee-memory-safety-and-prevent-segfaults

Helpful would be to have an example where pointers are needed. The 
example provided requires no pointers. So in Ada case, no such problem 
exist at all.

[...]

> So, can someone today use Ada in a straight-forward way to write 
> single- or multi-threaded applications that are, in every use-case, 
> totally immune at compile-time to use-after-free and double-free
> errors with zero, runtime overhead? Or can it not do that?
Without having other examples, the answer is: there is no such problem 
in Ada because arguments of task rendezvous are not pointers.

For multitasking, problems arise when the method of problem 
decomposition requires constructs which are not safe in the sense that 
safety is statically undecidable. Which means that a decidable static 
constraints would simply kill the algorithm.

 From the practical perspective it is usually possible to trade one 
danger for another (lesser, greater, equal), e.g. to exchange deadlock 
for livelock, but not getting rid of it altogether.

Considering the problem of having tasking safe per construction, my 
impression is that constraints are no or very little help. Additional 
methods of decomposition are.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2017-05-14 17:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-13 20:33 Rust's temporal safety for Ada/SPARK digitalkevlar
2017-05-13 21:19 ` Jeffrey R. Carter
2017-05-14 10:19   ` Niklas Holsti
2017-05-15 19:07   ` Simon Wright
2017-05-15 19:30     ` Jeffrey R. Carter
2017-05-17 21:21     ` moy
2017-05-14  3:24 ` Robert Eachus
2017-05-14 16:46 ` digitalkevlar
2017-05-14 17:18   ` Dmitry A. Kazakov [this message]
2017-05-14 17:36   ` Jeffrey R. Carter
2017-05-14 19:59     ` Niklas Holsti
2017-05-14 20:43       ` Simon Wright
2017-05-15  7:27         ` Dmitry A. Kazakov
2017-05-14 22:20       ` Dennis Lee Bieber
2017-05-15 16:23       ` Jeffrey R. Carter
2017-05-15 23:19     ` Randy Brukardt
2017-05-16 16:45       ` Shark8
2017-05-16 21:36         ` Randy Brukardt
2017-05-16 23:37           ` Shark8
2017-05-14 21:28 ` moy
2017-05-15 22:59 ` digitalkevlar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox