AdaCore Blog
blog.adacore.com · Company blog · on HN since 2015
AdaCore, the company behind GNAT tools, writes about Ada, SPARK, formal verification, and how they compare with Rust and C.
What HN saysCommenters recommend it for Ada/SPARK material, and link posts on proving a sort correct and on SPARK pointers inspired by Rust.
106HN people shared it
58linked it in comments
140stories submitted
3.2Kstory points
12 months agolast shared
2015people per year2026
Most-shared posts
- 1Pointers in SPARK/Ada inspired by Rust ownership model17 people · 10 points · first shared 2019 · 1 comments on HN
- 2Should I choose Ada, SPARK, or Rust over C/C++? (2024)6 people · 124 points · first shared 2024 · 166 comments on HN
- 3AdaCore and Ferrous Systems Joining Forces to Support Rust5 people · 357 points · first shared 2022 · 100 comments on HN
- 4I can’t believe that I can prove that it can sort5 people · 272 points · first shared 2022 · 113 comments on HN
- 5CuBit: A General-Purpose Operating System in SPARK/ Ada (2020)5 people · 25 points · first shared 2020 · 3 comments on HN
- 6Ada 202x Support in Gnat5 people · 14 points · first shared 2020 · discussion on HN
- 7Going Beyond Ada 20224 people · 142 points · first shared 2021 · 67 comments on HN
- 8How to avoid runtime errors on drones using SPARK (2015)4 people · 53 points · first shared 2015 · 23 comments on HN
- 9Proof of code with pointers now possible in SPARK using pledges4 people · 34 points · first shared 2019 · 4 comments on HN
- 10A New Era for Ada/Spark Open Source Community4 people · 24 points · first shared 2022 · 1 comments on HN
- 11Formal verification of legacy code after 10 years of production use4 people · 3 points · first shared 2016 · discussion on HN
- 12From Ada to Platinum Spark: A Case Study for Reusable Bounded Stacks4 people · 3 points · first shared 2020 · discussion on HN
- 13Using Gnat-LLVM to Target Ada to WebAssembly4 people · 1 points · first shared 2020 · discussion on HN
- 14Homepage4 people · first shared 2018
- 15A modern syntax for ada4 people · first shared 2020
What HN people wrote when they linked it
johnisgood · 2021-12-27
> but people assume our language is dead
And/or a lot of misconceptions. I showed up many times as well with those links, and explanations and whatnot.
I recommend https://blog.adacore.com/, too. Ada/SPARK is great when you want formal verification, and your checks to be done by GNATprove; statically, instead of dynamically. FWIW, you can disable runtime checks in Ada.
I also commented https://docs.adacore.com/live/wave/spark2014/html/spark2014_ug/en/sour… not too long ago. The whole documentation is useful anyway. You can prove the absence of memory leaks, among a lot of other stuff!
thorn · 2025-09-02
I think AdaCore stopped supporting GNAT community in 2022 and recommended to use Alire community, no?
https://blog.adacore.com/a-new-era-for-ada-spark-open-source-community
roenxi · 2025-02-13
People who don't want to read the first line of the article, rejoice!
It sounds like a good decision though. Formal verification tends to make more sense in highly concurrent situations where there is a high-value stable API to be supported. That describes graphics cards and surrounding environments really well so it makes sense that Nvidia would find use cases.
Something more from the article is also that they made the decision with a pilot project that went well. It'd be nice to have more details about it; that sort of thing is important to do well and always interesting. Lo and behold, we do have more details about it! https://blog.adacore.com/when-formal-verification-with-spark-is-the-st… - there is a video in there that looks to be worth a watch.
touisteur · 2024-12-28
SPARK allows you to statically prove properties about Ada code. Proving a sort implementation is a classic example : https://blog.adacore.com/i-cant-believe-that-i-can-prove-that-it-can-s…
Rochus · 2023-09-10
> what was the reason for inventing Rust?
There will always be new programming languages. In case of Rust the innovation was compile-time dynamic memory management, which then was not available in Ada; but Ada is catching up, see e.g. https://blog.adacore.com/using-pointers-in-spark.
> Why does our industry get so enthused with shiny new things
Innovations can give better opportunities to those who use them smartly. Often, the hype around a technology is so great that the industry is forced to show at least a minimal commitment to appease staff and investors, and not appear old-fashioned.
eggy · 2022-09-09
Hah, Chevy Spark, and it's a gasoline car!
I usually put "SPARK2014 programming" or "SPARK2014 Ada" in my searches. I used to get annoyed by all of the Apache Spark stuff that came up, but that seems to have waned a bit this past year or two.
Vermont Technical College (VTC) used SPARK2014 to program their CubeSat and the book, "Building High Integrity Applications with SPARK"[1] is a great intro to it in a nice context of practical use.
There was also an article on the AdaCore site about someone who rewrote some drone firmware in SPARK2014, which is another nice real-world application. [2]
[1] https://www.amazon.com/Building-High-Integrity-Applications-SPARK/dp/1…
[2] https://blog.adacore.com/how-to-prevent-drone-crashes-using-spark
MaxBarraclough · 2020-10-21
> we already have "practical" NP problem solvers in classical silicon in the form of SMT solvers.
They're out there, and practical for some problems, but SMT solvers aren't exactly a solved problem. They're used for deductive proofs about program correctness, which are still pretty finicky. [0]
[0] https://blog.adacore.com/using-spark-to-prove-255-bit-integer-arithmet…
ajxs · 2020-02-14
There's plenty of love for Ada, more than ever.
https://blog.adacore.com/the-emergence-of-a-new-ada-era
doublec · 2019-03-04
SPARK lets you write proofs - you can write different implementations of a function and prove at compile time they match some specification. An example of this is here: https://blog.adacore.com/gnatprove-tips-and-tricks-proving-the-ghost-c…
Here's another post with some examples: https://blog.adacore.com/taking-on-a-challenge-in-spark
There's a good book, Building High Integrity Applications in SPARK, that goes through things in detail. It's a good read for any programming language user to mine for ideas or explore how similar problems could be solved in their language: https://www.cambridge.org/core/books/building-high-integrity-applicati…
inamberclad · 2018-03-15
There's a free compiler called Gnat, but the community is still rather small. I think it's something of a catch-22. Most of the resources you'll find on the internet are old (mid-90s) blogs and educational sites.
Here's some of the better ones I've found:
https://www.adacore.com/gems/
https://blog.adacore.com/
https://two-wrongs.com/tags.html#ada
The official reference manual is freely available too, but it's quite dense.
rdk1207 · 2025-02-09
the blog is still going strong!
https://blog.adacore.com/
Jtsummers · 2022-02-02
I'm disagreeing with the assertion that Ada looks like COBOL. You may or may not agree with that statement, but you made it.
> This filtering process happens in the crudest possible way, based more on feelings and hearsay than on verified facts
And that's why people should stop making statements like:
>>> Ada, unfortunately, looks cobol-like, so someone who knows nothing automatically assumes a ton of bureaucracy. Run away if you want work done.
Without much stronger caveats to clarify that it is not a correct impression. Without a strong statement clarifying that it's only an impression (based on the most superficial of analyses) and not the reality, people will read comments like yours (and others in threads like this one) and never go any further to realize that they're false, and end up repeating them.
In an Ada thread just a few weeks back someone wrote COBOL-ish code claiming it was Ada code. It was a math-y example like the GCD code above, and clearly wouldn't work if you had even a passing familiarity with Ada. But it was written in such strong terms that it gave the impression the author was competent when they were really ignorant.
> If you look at rust, the work done by Mozilla and people like e.g. Steve Klabnik to put the language on the map is enourmously valuable. With code examples, blog post, fixing real world pain points, answering questions, .... It took years but they did it. If Ada had a group of people and a bigname organization, all doing this…
thesuperbigfrog · 2020-09-26
>> I don't know Ada well personally
>> But I'm not very educated.
If you don't know, please don't speculate.
I use Ada professionally and I am experimenting with Rust. Rust has great promise and I am interested to see where it will go, especially as an alternative to C++.
>> it's a bit less advanced than Rust at static checks
Ada 2012 has comparable and in many cases more advanced static checks than Rust with the exception of memory management. This is especially true of the Ada type system (https://learn.adacore.com/courses/intro-to-ada/chapters/strongly_typed… and design by contracts (https://learn.adacore.com/courses/intro-to-ada/chapters/contracts.html…
If you use the SPARK subset of Ada, you can use advanced tools to prove the correctness of your program. See https://learn.adacore.com/courses/intro-to-spark/index.html
Rust's borrow checker approach to memory management is novel and SPARK is acutally adding similar concepts to the next version of SPARK (https://blog.adacore.com/using-pointers-in-spark).
>> a good bit simpler than Rust and Swift but more complex than Go
Ada is a large and fairly complex language because it was designed for hard real-time, safety-critical, embedded systems and it has been in real-world use for 40+ years. I don't think it is that simple, but judging simplicity is subjective: what one person sees as complex, another person might see as simple. You can browse the Ada 2012 Language Reference Manual and see what…
bgwalter · 2025-11-11
Since it seems that Rust programmers are unable to provide a definition for "memory safety", here is what more mature and academically minded people think:
https://blog.adacore.com/memory-safety-in-rust
Notice that in-bounds indexing is included, same as in the definition from this submission that I quoted at you.
jonjacky · 2025-11-09
CuBit is another operating system in SPARK/Ada.
1. https://blog.adacore.com/cubit-a-general-purpose-operating-system-in-s…
2. https://github.com/docandrew/CuBit
valorzard · 2025-09-12
Ada is something I've always wanted to get into (it interests me that there's a low level programming language that came around at the same time as C but just never took off)
Ada has a bunch of features built into it already, including concurrency support with tasks [0]
I just haven't found the right motivation to figure out what to do with it yet. Maybe I could play around with the Raylib bindings [1] at some point?
There's also the SDL bindings, which a LOT of work has seemingly gone into [2]
[0] https://learn.adacore.com/courses/intro-to-ada/chapters/tasking.html
[1] https://blog.adacore.com/ada-gamedev-part-3-enjoy-video-games-programm…
[2] https://github.com/ada-game-framework/sdlada
shakna · 2025-06-05
I don't think a single point there is true.
Ada has had shared aliases since 1995. Its had zero cost abstractions since before then.
Slicing memory from a string is in the intro manual, for example.
my_var(2 .. 6) Ada doesn't rely on you to be disciplined. [0] Memory safety comes with SPARK. Its a theorum prover.
[0] https://blog.adacore.com/memory-safety-in-ada-and-spark-through-langua…
tiffanyh · 2025-04-27
I’ve always found the table comparison (Rust/Ada/SPARK) from that same source to be very informative:
https://blog.adacore.com/should-i-choose-ada-spark-or-rust-over-c-c
alberth · 2025-02-14
I really wish there was more active development on SPARK.
It's largely untouched over the last 10-years.
https://github.com/AdaCore/spark2014
For those not aware, SPARK gives even more safeguards/guarantees than Rust (see below) ... and also does it at compile time (when not all of Rust safeguards are at compile time).
https://blog.adacore.com/should-i-choose-ada-spark-or-rust-over-c-c
AlotOfReading · 2025-02-09
Ada/SPARK can be memory safe, in part because they borrowed ideas from Rust.
[0] https://blog.adacore.com/using-pointers-in-spark
jiehong · 2025-01-17
Alternatively, I see an LLVM front-end for Ada [0], but I'm not a user, so the maturity of such a solution is unclear to me.
[0]: https://blog.adacore.com/combining-gnat-with-llvm
docandrew · 2024-12-28
One thing that’s kind of interesting about SPARK in particular - all the contracts get compiled to why3ml as an intermediate step before running through the solvers. If there are any VCs that can’t be discharged using the automatic provers, you can manually prove them using Coq: https://blog.adacore.com/using-coq-to-verify-spark-2014-code
I think the lines between what some consider true DT and what is possible w/ Ada might be more blurred than people expect.
LiamPowell · 2024-12-28
SPARK will give you some guidance, but there's no particularly fancy interactive tools. Here's an example of working through a different sorting algorithm: https://blog.adacore.com/i-cant-believe-that-i-can-prove-that-it-can-s…
barkingcat · 2024-12-01
I use it to learn new languages - this year it's Ada -
https://blog.adacore.com/announcing-advent-of-ada-2024-coding-for-a-ca…
cyberax · 2024-09-26
Not really. Standard Pascal's dynamic features were barely present, but even they allowed dangling references to exist.
And all practical Pascal clones (e.g. Object Pascal) had to grow constructor/destructor systems to cleanup the memory on de-allocation (or they went the garbage collection route). So they were on-par with C++ for safety.
Ada is similar. It provided safety only for static allocations with bounds known at the compile-time. Their version of safe dynamic allocations basically borrowed Rust's borrow checker: https://blog.adacore.com/using-pointers-in-spark
pyjarrett · 2024-03-20
Ada is used quite often in embedded systems.
- https://blog.adacore.com/ada-on-any-arm-cortex-m-device-in-just-a-coup…
- https://github.com/AdaCore/Ada_Drivers_Library
stressinduktion · 2024-01-28
Related, hardbool, it seems gcc can automatically handle this soon.
https://blog.adacore.com/adacore-enhances-gcc-security-with-innovative… and https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-h…
trealira · 2023-12-12
c-cube · 2022-11-04
Who said anything about RAII? Having RAII doesn't make C++ memory safe. If you can take a reference or pointer to some RAII-created vector, and access it after the vector is gone… then you're not memory safe?
Yes, SPARK exists, and is very cool. I think there's work on a similar system for rust (or ferrocene, anyway, which is being co-developed by AdaCore: https://blog.adacore.com/adacore-and-ferrous-systems-joining-forces-to… It also seems that SPARK now has memory ownership and aliasing support, but only since ~2019 (https://blog.adacore.com/using-pointers-in-spark), and with clear inspiration from rust. It seems to me that this addition to SPARK was felt necessary by the AdaCore people, meaning that rust had something Ada did not support (or did not support well).
jerknextdoor · 2022-03-28
While this submission may be unaware, Ada did make an announcement[1] a few weeks back that they are exploring Rust for critical applications.
[1] https://blog.adacore.com/adacore-and-ferrous-systems-joining-forces-to…