Masten Space Systems is using Ada and Spark to land on the Moon's south pole [pdf]
adacore.com
adacore.com
Frama-C allows formal verification of essentially arbitrary heap manipulation algorithms. You can implement linked lists and graphs in traditional C with Frama-C annotations in the comments, then prove your code never dereferences NULL, never has an integer overflow, etc.
One single commercial Ada vendor offers Spark, a formally verifiable subset of Ada. Spark does not allow arbitrary dynamically allocated data structures like Frama-C does.
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. :-)
Spark has added checks on memory ownership, that it seems (willing to be corrected) Frama-C didn't have yet.
From a pure tech stack point of view, down there you'll find Why3 and SMT solvers to perform most automatic proof/discharging of verification conditions, and then around that you'll find either a rich set of plugins (Frama-C) because C is... a tall order, or a series of static analysis tools (heavy-duty like codepeer, or lightweight libadalang-based abstract interpretation things) combined into the proof and verification environment. There's also been a lot of amazing work on floating point code verification for both in the previous years, and it was done mostly at the Why3 and SMT solver (or different kind of solvers/verifiers such as gappa) so everyone profits.
And, lest people might think both communities don't interact, the Spark and Frama-C people have an annual (or is it every other year) joint conference.
I'd be quite happy to find more people diving into Frama-C and see what they do and how they manage to write safe software. I'd also be quite happy to see rust building over Why3 (among other things) for their proof/verification efforts. More fruits from all the deep efforts of the verification community.
'Frama-C so verbose': ??? Ada is the most verbose programming language, ever, even before you had the extremely verbose Spark contracts. Could you show me an example of Frama-C with annotations being more verbose than Ada/Spark?
'Spark has added checks on memory ownership': A Rust-like pointer ownership tester has its advantages and limitations.
Advantages: if you have team of 20 engineers working on a 20 million line web browser and no single engineer understands how the whole code base works, a pointer borrow-checker prevents an important class of errors.
Disadvantages: Rust tutorials point out that you have to resort to 'unsafe Rust' to implement even an intro-to-computer-science linked list. You have to use unsafe Rust to implement your fancy heap manipulation algorithms. Unsafe vs safe Rust is a bit like Ada vs. Spark ("safe Ada").
'I'd be quite happy to find more people diving into Frama-C': Frama-C is trending upward and Ada is in decline, ever since the Ariane 5 explosion on 4 June 1996. The US DOD consequently shut down its Ada office and eliminated the Ada requirement, and C/C++ subsets increasingly dominated.
As for the rest, I checked again some recent Frama-C examples after your reply and verbosity is on par (similar quantifiers, loop invariants, etc.) and I don't see 'extremely verbose' in neither. Mostly I was focused on implicit versus explicit (in a 'boilerplate' sense).
As for the decline of Ada I see different things in my industry and a language and environment that keeps evolving and getting into more industries and making strides in very interesting domains. The DOD isn't the most interesting indicator of the liveness of a language, and I'm not sure what Ariane 5 brings here, except that when you reuse a binary component in a different setting without integration testing you get wild French fireworks?
As for the 'can't program a basic list in rust' I can only say that 99.9% of the time we're not rewriting a basic data structure, we reuse one from some standard library or a trusted component library, and I may have seen maybe one bug in those in my 15y or sw engineering, and countless ones in app or business logic, or serialization/deserialisation code... So yeah, if rust, spark or other hard ass static analysis tools makers are reading this, please keep making proof & verification tech modular. The more the tech advances the more spark we can have proved automatically without proof chops, the safer the world will be. But let me opt in the very hard stuff, please... Let me put the effort where it counts.
This should be normal practice IMO.
Coding is the process of fully understanding what needs to be built. We've all seen architecture astronauts churn out reams of UML that still result in a broken system. Exploring the space via iterative MVP is far more productive.
That's when you throw things into simulation and do some Hardware-in-the-Loop testing. If I learned anything from studying the failure of Ariane V flight 1, it's that while analysis can be useful, testing is usually even better.
https://en.wikipedia.org/wiki/Cluster_(spacecraft)#Launch_fa...
Not every domain affords you the luxury of coding the wrong thing and then fixing it in a later iteration. Sometimes due to financial constraints, other times because people wouldn't exactly be okay with the 0.7.1 version of your plane software leading to crashes until the next patch.
That said, i somewhat agree with you that UML and abstractions can only lead to problems if there's too many of them. A few high level overview diagrams can be good to have, but only as long as they conform to the actual architecture and models 1:1, and as long as they're not made at the expense of actually writing working software and perfecting it.
However, as long as only one person with incomplete knowledge of the domain or requirements is the one to write the code, you'll still end up with sub par solution. Personally, i think that the only way around that would be a paradigm shift of sorts - instead of planning meetings that aren't good enough, you might as well do programming meetings and mob programming in which you'd code the most important architectural bits of the software that you need, leaving the legwork for individual contributors later.
In my experience, code review is far too late for serious decisions to be made. At best, the reviewer will need to wrangle with hammering your sub optimal code into shape, at worst they'll just be like: "Sure, this looks like Java, it can go into the main branch. QA can figure out whether it's good enough or not."
better: s/Is Using/Will Use/
best: s/Is Using/Intends to Use/Used in the software for e.g. French nuclear power plants and other safety-critical systems.
Here you can see some real uses of Spark listed: https://www.cse.chalmers.se/edu/year/2017/course/TDA294_Form...
I'll ask around about nuclear, thanks again!
On the bright side, at least there's an open source compiler available for it as a part of the GNU project: http://www.gnu.org/software/gnat/
Here's a quick intro to the actual language: https://learn.adacore.com/courses/intro-to-ada/index.html
(Also, confusingly, SPARK was originally an acronym, but isn't anymore - yet it's still written in all-caps.)
Ada is just a name, like Ada Lovelace, its namesake.
This actually happened on Apollo 11. The 1201 and 1202 program alarms were the computer overloading, and running out of space for more processes. When this happened, the computer would reset, and navigation would pick up again.
Erlang didn't invent much there, and restarting/rebooting isn't always possible (try doing that in less than 10ms). Sometimes, the application itself needs to handle problems. This puts lots of 'classic IT' (interface bonding, fail overs, etc.) stuff to the bin very quick.
I've been looking into erlang on and off for nearly 14 years now. I think the language is really neat. But the self-healing supervisor tree thing is something that I've yet to get my head wrapped around.
Like ... if you have some code that's like "X / 0" then it seems like it's not going to matter how many times you restart the process.
So every time you get that input you’ll still crash, but other transactions will continue normally. Hopefully that input is either due to a transitory glitch like a bit flipped in RAM, or a user who isn’t bored enough to keep submitting it, but either way the process isolation means all your other jobs can continue.
As someone with a lot of experience building systems in the big data space... I was very concerned for their lander.
They were some of the buggiest most crash-probe applications I've ever used, whilst the whole time their marketing trumpeted about how much better the quality of your software would be if you used them.
Oh the irony!