Re:Masten Space Systems is using Ada and Spark to land on th...
by dandotway on Friday October 01, 2021 @12:59PM
(#28720901)
Yes, SPARK has a Rust-like borrow checker that doesn't allow implementing arbitrary pointer graphs. You have to use 'unsafe Rust' to implement linked list containers which, once implemented, other parts of the codebase can then consume in 'safe Rust'. Seems to be the same deal with SPARK ('safe Ada') vs vanilla Ada ('unsafe Ada').
[ Parent
| on HN ]
Re:Masten Space Systems is using Ada and Spark to land on th...
by p_l on Friday October 01, 2021 @05:09PM
(#28723405)
Interestingly both Frama-C and SPARK use linked list as an example. But yes, not everything can be verified, though I'd rather bet on Ada than Rust in this area.
Re:Masten Space Systems is using Ada and Spark to land on th...
by dandotway on Friday October 01, 2021 @08:59PM
(#28725046)
The SPARK example I found uses singly-linked lists and says doubly-linked lists and graphs with cycles are not supported:
https://blog.adacore.com/pointer-based-data-structures-in-sp...
Yes, I could and should have been more explicit when I spoke of 'linked lists' without further qualification. While talking about these languages designed to eliminate all ambiguity I would do well to be unambiguous. :-)