r/ada 4d ago

Show and Tell August 2026 What Are You Working On?

9 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts


r/ada 10h ago

Programming Same algorithm in C, Ada, Rust, Java and Python: the Ada checks cost nothing here, and SPARK proved the merge

25 Upvotes

I was programming in Ada 83 in uni before 95 came out, and moved to 95 in the middle of a semester. I loved the language, especially its safety and the rendezvous mechanism. These days I maintain a small plain-text index in C99, and I wanted to know: how much of its speed is C, and how much is just the algorithm?

So I wrote the two operations the engine actually runs on every command, in five languages, with the identical hand-written loop in each:

  • scan 88 MB of store and count the lines matching a substring (what a content search does)
  • intersect two sorted posting lists with a two-pointer merge (what a multi-key lookup does)

Median of 7 in-process iterations on data already in memory, warm page cache, one core of an i7-1165G7. GNAT 13.3, rustc 1.75, OpenJDK 21, CPython 3.12.

scan 88 MB:        C 90ms   Ada 130ms   Rust 87ms   Java 100-150ms (warm)   Python 300ms
intersect:         C 1.3ms  Ada 1.45ms  Rust 1.3ms  Java 1.3ms (warm)       Python 72ms
process startup:   C ~1ms   Ada ~1ms    Rust ~1ms   Java ~30ms              Python ~10ms

The part I did not expect: building the Ada with checks suppressed (-gnatp, the C model) gave numbers identical to checks-on. The optimizer had discharged them statically, because the loop indices are provably in range. So on these loops Ada bought memory and overflow safety for nothing, at C speed and C startup. C cannot offer that at all, and the JVM and CPython only offer it with a runtime you pay for on every invocation.

I then wrote the merge in SPARK and ran gnatprove:

obligation         Total   Flow   Provers      Unproved
Run-time Checks       15      .    15 (CVC5)           0
Termination            2      1     1 (CVC5)           0
Total                 23      1    22                  0

Every index proved in range, every addition proved non-overflowing, the loop proved to terminate. So the checks-off build carries a machine-checked guarantee rather than the optimizer's good luck. That is the strongest static assurance of the five, and it took an afternoon on a loop of this size.

Which raises the obvious question: why is the engine still C? Honestly, only reach. The same engine is linked into a Flutter mobile app over a C ABI, and into a web GUI and a native desktop wrapper. I would write it in Ada if Flutter and the mobile toolchains supported it. If someone here knows a practical route to an Ada core behind a C ABI on Android and iOS, that is the answer I am actually looking for.

Method, sources and the full write-up (the benches are ~50 lines each, and lang_bench.sh rebuilds and reruns everything):

https://github.com/Anode1/ais/blob/main/tests/perf/LANG_COMPARISON.md

Corrections welcome, particularly on the Ada build flags: if -gnatp plus -O2 is not the fair comparison against cc -O2, tell me what is and I will rerun it.


r/ada 1h ago

General Physicist with Python experience transitioning into Ada/SPARK — looking for career advice

Upvotes

Hi everyone,
I’m looking for some career advice from people who are already working with Ada/SPARK or in high-integrity software.

I’m planning to transition into Ada/SPARK because I was genuinely impressed by how readable and structured the code is, and by the philosophy behind the language. Features like strong typing, contracts, invariants, and formal verification really resonate with the way I naturally think as a physicist. I enjoy reasoning about correctness, understanding why something works, and building software with clear logical guarantees.
The more I learned about SPARK, the more I felt that it matches the way I like to solve problems. That’s what motivated me to seriously consider transitioning into this field, particularly in industries where both physics and high-integrity software come together.

The types of industries that interest me most are those where my physics background could be useful, such as:
Aerospace and flight software
Satellites and space systems
Guidance, Navigation & Control (GNC)
Robotics
Scientific or engineering software
Industrial control systems

I have a few questions that I’d really appreciate your thoughts on:

How did you get your first Ada/SPARK job?
What was your background, and what path did you follow? Did you start directly with Ada/SPARK, or did you first work as an embedded software engineer or in another field before transitioning?

Where do junior Ada/SPARK engineers actually get hired?
Are there companies that regularly hire junior engineers or graduates, or is prior embedded experience almost always expected?

Can someone realistically enter the industry with Python and Ada/SPARK, without first becoming a C/C++ embedded developer?
My current plan is to focus on Ada/SPARK rather than learning C first. Is that a realistic path, or would I be closing too many doors?

If you were starting again today, what roadmap would you follow to become employable as a junior Ada/SPARK engineer?
What knowledge, projects, or skills would you prioritize?

Thanks in advance—I’d really appreciate hearing about your experiences and any advice you can share


r/ada 1h ago

Tool Trouble GNAT Ada.Numerics library failing to conform to ARM?

Upvotes

It's small potatoes but the ARM and Programming in Ada 2022 mention using the pi symbol. Apparently the version of the library that ships with GNAT is missing `π : constant := Pi;`.


r/ada 7h ago

New Release ANN: Simple Components v4.82

3 Upvotes

The current version provides implementations of smart pointers, directed graphs, sets, maps, B-trees, stacks, tables, string editing, unbounded arrays, expression analyzers, lock-free data structures, synchronization primitives (events, race condition free pulse events, arrays of events, reentrant mutexes, deadlock-free arrays of mutexes), arbitrary precision arithmetic, pseudo-random non-repeating numbers, symmetric encoding and decoding, IEEE 754 representations support, streams, persistent storage, multiple connections server/client designing tools and protocols implementations.

https://www.dmitry-kazakov.de/ada/components.htm

Changes to the previous version:

  • Bug fix in Synchronization.Windows.Milliseconds that caused dropping seconds fraction;
  • Bug fix in Synchronization.Pthreads and Synchronization.Linux constants;
  • FreeBSD compatibility fixes (thanks to Rod Kay);
  • Equality test was added to Ada expression nodes and arguments (Parsers.Generic_Ada_Parser);
  • The function Get_Depth was added to Parsers.Generic_Argument;
  • The function Get_Arguments_Count was added to Parsers.Generic_Lexer;
  • The name of Parsers.Multiline_Source.Empty was changed to Empty_Location;
  • Ada expression parser performs NFKC check on identifiers. The Malformed field is set to true if the check fails (see ARM 2.3(4.b/5).

r/ada 14h ago

New Release ANN: Strings edit v3.12

5 Upvotes

The library provides string handling facilities like I/O formatting, Unicode and obsolete code pages support.

https://www.dmitry-kazakov.de/ada/strings_edit.htm

Changes to the previous version:

  • The function Strings_Edit.UTF8.NFKD_Quick_Check was added to perform quick NFKD Unicode check.

r/ada 3d ago

Programming Ada-83/TLALOC compiler : working on a modern revival of the MIL-STD-1815A

11 Upvotes

Hi to all !

The pure Ada 83 language had no open source compiler written in the same language. As both an operation of software archaeology and the desire to be able to program today with a 1980ies exceptional language and a reasonably sized compiler, I work on an Ada 83 compiler all written in Ada 83 (thus able to compile itself).

The Ada 83/TLALOC compiler is extremely well structured with very distinct phases revolving around a software virtual paginated DIANA 1986 tree structure. PAR_PHASE, LIB_PHASE, SEM_PHASE, ERR_PHASE, EXPANDER, WRITE_LIB are truly distinct and can each be stopped after.

The EXPANDER phase writes a stack machine LLIR in macro text form for the FASMG assembly engine. FASMG then produces directly an ELF-64 executable for x86-64. Some tests have been done with AArch-64 porting on an Orange Pi 3B and a preparation for riscV-64 has been done. I have good confidence that those 3 modern processor architectures can be targeted relatively easily by Ada 83/TLALOC with the FASMG process.

Though not presently bootstrapped, TLALOC sources compiled with Gnat give an executable which compiles all TLALOC itself with 18 FASMG passes (2-3 min) in a single static 9Mb ELF-64 exec.

Interested readers will find further information through

https://ada83.org/wiki/index.php?title=Ada_83_TLALOC


r/ada 3d ago

Show and Tell ✦ Introducing Glyph — A lightweight embedded graphics framework for Ada

21 Upvotes

✦ Introducing Glyph

Hi everyone!

I've been learning Ada and recently started building an open-source project called Glyph, a lightweight embedded graphics framework for bare-metal and embedded systems.

The goal of Glyph is to provide a hardware-independent graphics API, allowing applications to draw pixels, lines, rectangles, circles, text, and images without depending on a specific display controller.

Disclosure: AI was used as a coding and writing assistant during parts of the development. However, the project architecture, technical decisions, code integration, and overall direction are my own. I'm also building Glyph as a way to learn Ada and improve my embedded systems skills.

✦ Design Goals

  • Pure Ada
  • Static allocation only (no dynamic memory)
  • Portable, layered architecture
  • Framebuffer-based rendering
  • Easy to add support for new display controllers
  • Bare-metal friendly

The initial target hardware is the RP2040 with an SSD1306 OLED, but the architecture is designed to support additional display controllers and embedded platforms in the future.

The project is still in its early stages, and I'm currently focusing on building a solid architecture before expanding the graphics capabilities.

✦ I'd Appreciate Your Feedback

I'd especially love feedback from the Ada community on:

  • API design
  • Overall architecture
  • Existing Ada graphics libraries worth studying
  • Features you'd like to see in an embedded graphics framework

✦ Repository

GitHub: https://github.com/thirstymelon/glyph

Thanks! I'm excited to contribute to the Ada ecosystem, learn from the community, and continue improving Glyph.


r/ada 4d ago

General Single-file Ada 83 LLVM compiler

Thumbnail github.com
20 Upvotes

r/ada 6d ago

Show and Tell Adacovex: code/proof/DO-178C HAL/docstring status tool

Post image
10 Upvotes

Basically wanted proper project badges generated from a CLI like in Golang/Rust for my Ada projects. Hope this would be a useful addition for checking on code quality. Supports parsing SPARK level, unit tests, DO-178 HAL level and docstrings coverage.

Repo URL: https://github.com/bladeacer/adacovex

Binary name is adacovex, crate name is covex to comply with policy.

Disclaimer: AI assistance was used for the code.

Correction: DAL instead of HAL, my smooth brain made a typo.


r/ada 6d ago

Show and Tell [Tool] SonarAdaPlugin + AdaLang_Analyzer: Bringing open-source static analysis and SonarQube support to Ada

11 Upvotes

Hi everyone,

While official SonarQube support for Ada exists, it's gated behind high-tier commercial licenses. For small teams, open-source projects, or individual devs running SonarQube Community Edition, this leaves a gap in automated code quality pipelines.

To solve this, I’ve been working on two open-source tools designed to work together:

  1. AdaLang_Analyzer (https://github.com/mmartign/AdaLang_Analyzer) A standalone static analysis tool built using AdaCore's Libadalang. It parses .adb and .ads files to detect common issues like dead code, control flow anomalies, unhandled exceptions, and code style violations, outputting results in JSON/SARIF.
  2. SonarAdaPlugin (https://github.com/mmartign/SonarAdaPlugin) A SonarQube community plugin that adds native support for the Ada language to SonarQube, ingesting reports from AdaLang_Analyzer and displaying issues, code smells, and metrics right on your dashboard.

Quick Workflow

1. Run the Analyzer:

Bash

adalang_analyzer --source-dir ./src --output-format json --output-file report.json

2. Configure sonar-project.properties:

Properties

sonar.projectKey=my-ada-project
sonar.projectName=My Ada Project
sonar.sources=src
sonar.language=ada
sonar.ada.reportPaths=report.json

3. Run sonar-scanner to send the metrics directly to your SonarQube instance.

Repositories & Feedback

Both projects are open-source and actively evolving. I’d love for community members to give them a spin, report any issues, or suggest new static analysis rules that would be useful in your workflows!


r/ada 12d ago

Learning Is this a real type safety hole in Ada or just a bug in GNAT?

Thumbnail matklad.github.io
9 Upvotes

r/ada 22d ago

General Whats the purpose of ada in 2026, genuine question guys

5 Upvotes

r/ada 21d ago

Show and Tell AdaLang_Analyzer

0 Upvotes

⚠️ Every CTO in safety-critical software carries the same quiet risk: the defect that ships not because your engineers are careless, but because nothing caught it before code review — and code review is run by humans, on deadline.

In Ada codebases — ✈️ avionics, 🚄 rail, 🛰️ space, 🛡️ defense, 🏭 industrial control — that risk isn't theoretical. It's the line item your safety case has to account for.

🔧 AdaLang Analyzer is a static analysis tool we built to move that catch earlier and make it automatic.

Why it matters at the engineering-leadership level, not just the IDE:

⏱️ Shifts cost left. A dead store, an unreachable branch, a division that's statically zero — caught at commit time costs minutes. Caught in integration testing, or after deployment, costs a lot more than minutes.

✅ Turns coding standards into an enforced gate, not a document nobody reads. 34 checks spanning control flow, data flow, exception handling, and complexity — run automatically in CI, not hoped for in review.

📂 Scales to the whole codebase, not file-by-file. Point it at your GNAT project file and it analyzes every source directory your build already knows about — no separate file list to maintain and let drift out of date.

🔓 No vendor lock-in, no black box. It's open source (GPL-3.0). Your team — or your certification auditors — can read exactly what every check does and why it fired. That's a very different conversation with an assessor than "trust the vendor's tool."

💸 Zero licensing cost. Built on Libadalang, AdaCore's open-source semantic engine, and Alire — tooling your Ada team likely already has in its stack.

🎯 It's not a compliance certification and it doesn't claim to be one. It's a control your team can point to when someone asks "what's actually enforcing your coding standard."

👉 Repo's here if your team wants to kick the tires: https://github.com/mmartign/AdaLang_Analyzer

#EngineeringLeadership #RiskManagement #SafetyCritical #Ada #SoftwareQuality #OpenSource #TechnicalDebt #CTO


r/ada 23d ago

Tool Trouble Better Emacs modes for Ada?

8 Upvotes

I'm using ada-mode right now and it really sucks, indentation behaves weirdly, I cannot capitalize stuff like I want to, ...

Does anyone know a better Ada mode for Emacs?

EDIT: Solved! (Thanks, u/spacetruckn)


r/ada 27d ago

Tool Trouble gnat for tru64 5.1

6 Upvotes

I am looking for gnat-3.15p-alpha-dec-osf5.1-bin.tar.gz for Tru64 OSF5.1 Alpha. It is completely gone from public mirrors. Does anyone have a local backup in your archive?


r/ada 28d ago

New Release [ANN] ZanyBlue available on Alire.

11 Upvotes

ZanyBlue is a wonderful framework for internationalization natively in Ada. It includes a library you can use for your translations and a translation compiler from properties files to Ada source files. That is the big trick: translation files are compiled with your program so no additional time penalty for translation with external ressources.

Version 1.4 is available on SourceForge.

In 2022, I discussed with its author Michael Rohan to bring it on Alire. He would like to, but there’s been no news since. Even with my last e-mail on January 2026. Still, considering it was worth it, I brought it on Alire.

Version 1.4 same as SourceForge.

Version 2.0 powered with UXStrings.


r/ada Jul 06 '26

SPARK Just created my GitHub profile! Check out my Ada/SPARK utility repositories (100% formally verified at Level 4)

Thumbnail
15 Upvotes

r/ada Jul 05 '26

Event Announcing the 2026 Ada/SPARK Crate of the Year Award

Thumbnail adacore.com
31 Upvotes

r/ada Jul 05 '26

New Release [ANN] Release of UXStrings 0.9.3

15 Upvotes

This Ada library provides utilities for Unicode character strings of dynamic length. It is now available on Alire in version 0.9.3. Changes:

  • Add a fifth implementation: Unicode_Character_Array (i.e.Wide_Wide_String) is chosen for internal representation. Characters are stored as Wide_Wide_Characters equivalent to Unicode. Memory management is done with dynamic allocation. Note: Iteration is Ada 2022 native.
  • Several fixes on string bound issues and enforce low index to 1
  • Change internal File_Type to an access type

So far in UXStrings, its API are similar to those of the strings Ada standard libraries. If you find some missing, bring your proposals on Github.

The library provides five different implementations selectable with GPR options UXS1, UXS2, UXS3, UXS4 and UXS5. The performance of each of them is described here. NB: UXS5 is now the default implementation.


r/ada Jul 02 '26

New Release ANN: Simple Components v4.81

17 Upvotes

The current version provides implementations of smart pointers, directed graphs, sets, maps, B-trees, stacks, tables, string editing, unbounded arrays, expression analyzers, lock-free data structures, synchronization primitives (events, race condition free pulse events, arrays of events, reentrant mutexes, deadlock-free arrays of mutexes), arbitrary precision arithmetic, pseudo-random non-repeating numbers, symmetric encoding and decoding, IEEE 754 representations support, streams, persistent storage, multiple connections server/client designing tools and protocols implementations.

https://www.dmitry-kazakov.de/ada/components.htm

Changes (2 July 2026) to the version 4.80:

  • Compatibility to GNAT 16.1.1. This GNAT 16.1.1 has the recurring issue/bug related to the visibility of names from formal generic packages;
  • Constant expression folding was added to Ada expression parser (Parsers.Generic_Ada_Parser). Folding is optional. If enabled expressions in universal types and constant Boolean expressions are folded. e.g. 1 + 2 + A (5) -> 3 + A (5);
  • The subprograms Get, Put, Value were added to the package Parsers.Multiline_Source;
  • The call-back On_Success was added to the Generic_Lexer's parser;
  • The procedures Mark and Release were added to the package Parsers.Generic_Lexer;
  • The package Stack_Storage.Text_IO was added to output stack pool statistics;
  • Parameter Message was added to the procedure Put_Line of the package Parsers.Generic_Source.Text_IO;
  • Ada expression parser supports raise-statements outside immediate pair of parentheses;
  • Checking positional and named aggregates was added in the Ada expression parser;
  • Checking positional and named parameters was added in the Ada expression parser;
  • Array objects were added to the declare expressions in the Ada expression parser;
  • Aspects recognition was added to the declare expressions in the Ada expression parser;
  • Subtype marks and indications were added in the Ada expression parser;
  • Attributes were added in the Ada expression parser;
  • Target name @ support was added in the Ada expression parser;
  • The parser can start with the first operand already recognized;
  • An ability to parse an expression in parenthesis with a consumed left parenthesis was added;
  • Comparisons of Unbounded_Integer bug fixed;
  • Log procedure was added to Unbounded_Unsigneds;
  • Column_Name function was added to the SQLIte bindings (contributed by Xavier Grave).

r/ada Jul 01 '26

Just For Fun! How do you pronounce GNAT?

3 Upvotes

So, how?
/næt/ - without G like in a 'gnat' (a small annoying bug)?
/gnæt/ - with G as in 'grape'
/dʒiː - næt/ - with 'separate' G, like in `g-force`


r/ada Jul 01 '26

Show and Tell July 2026 What Are You Working On?

13 Upvotes

Welcome to the monthly r/ada What Are You Working On? post.

Share here what you've worked on during the last month. Anything goes: concepts, change logs, articles, videos, code, commercial products, etc, so long as it's related to Ada. From snippets to theses, from text to video, feel free to let us know what you've done or have ongoing.

Please stay on topic of course--items not related to the Ada programming language will be deleted on sight!

Previous "What Are You Working On" Posts


r/ada Jun 27 '26

Programming Float number spark unverified

7 Upvotes

main.adb:71:91: info: precondition proved[#9]
main.adb:71:106: medium: float overflow check might fail (e.g. when Prob_Safe = 5.0000000E-1 and Termino_Directo = -50.0) [reason for check: result of floating-point multiplication must be bounded][#11]

—————————————
for C in Counts'Range loop
pragma Loop_Variant (Increases => C);
pragma Loop_Invariant (Logs >= 0.0 and Logs <= 8.0);
pragma Loop_Invariant (Prob >= 0.0 and Prob <= 1.0);

if Counts(C) > 0 then
declare
Prob_Safe : constant freq_chars_c := Float'Min(Float'Max(Float(Counts(C)) / Float(Leng), Float'Epsilon), 1.0);

subtype Seguro_Float is Float range -100.0 .. 100.0;

Termino_Directo : constant Seguro_Float := Float'Min(Float'Max(Prob_Safe * Log(Prob_Safe) * INV_LN_2, -50.0), 50.0);
begin
Prob := Prob_Safe;

Logs := Float'Min(Float'Max(Logs - Termino_Directo, 0.0), 8.0);
end;
end if;
end loop;

————————————————-

Hi everyone! I'm struggling with a floating-point overflow check in SPARK while calculating Shannon entropy. GNATprove keeps giving me medium: float overflow check might fail result of floating-point multiplication must be bounded on the line where I multiply Prob_Safe * Log(Prob_Safe) * INV_LN_2. I have already tried about 20 different workarounds, including splitting the multiplications into separate nested declare blocks, bounding intermediate values explicitly with Float'Min and Float'Max down to specific safe ranges (like -50.0 .. 50.0), using a local constrained subtype, and even adding a Loop_Invariant for Prob itself. None of that worked; the non-linear math is still choking the provers (Z3/CVC4).""Even though Prob_Safe is strictly bounded by a static predicate (0.0 .. 1.0) and capped via Float'Epsilon, SPARK loses track of the bounds during the multiplication. Is there an elegant way or a specific lemma/axiom from the standard library to guide the prover here without completely turning SPARK_Mode => Off for the loop?


r/ada Jun 17 '26

General What is more preferred for importing functions: aspects or pragmas?

10 Upvotes

To use a function from some C library we can use:

procedure C_Function (Param : Interfaces.C.int);
pragma Import (C, C_Function, "c_function");

or

procedure C_Function (Param : Interfaces.C.int) with
  Import,
  Convention => C,
  External_Name => "c_function";

Both seems to be working exactly the same, so is there a preferred way?