Ada environment

From my understanding, Ada is like Prolog in the sense that it’s an ISO standard, with multiple implementations/compilers.

Where can I find the list of Ada implementations and their build tools, package managers, etc?

I’m using for now Alire, which I find straightforward in building/running/managing crates, etc. I tried GNAT, but it seems more complex (make files, etc)

I’m just looking for the most efficient learning path. I want tools that spare me the pain of all what happens under the hood.

Also, in terms of docs, I’m confused: should I check adacore docs or ada-lang or ada-auth..? (normally, they should be ISO-compliant, but I just want to confirm…)

Thank you

What’s the “reference” among these “references”?

Alire is a package manager that wraps around GNAT and a program called GPRBuild, so if you are using gnat you have 3 separate ways to build, with varying levels of ease and custimization:

  • gnatmake command - very bare bones, command line with switches
  • gprbuild command - a build system that uses a special *.gpr file to tell gnatmake how to build with all of your options/switches but in a much more readable way that can be customized much more
  • alr build command - Alire specific command that wraps around gprbuild that uses special *.toml files to tell alire how to manage gprbuild files and options but also adds even more customization options on top of what gprbuild allows. It also gives you access to a plethora of libraries and examples.

Note that gnatmake and gprbuild are both products of a specific company that makes GNAT called AdaCore. Alire is separately maintained by members of the community.

All of that is for one ada compiler. There are others out there. Here is a list of some options:

You’ll have to look at their various websites and maybe check with their support channels to find out what build environments / resources they have.

2 Likes

The official standard is the Ada Reference Manual (usually referred to as the “RM” or “ARM”, depending on if it is annotated or not, ARM for annotated). The official source is the ISO website, but costs money. The ada-auth website contains a free copy and is maintained by the makers of the standard, known as the Ada Rapporteur Group (ARG) . They are in the process of moving from the current ada-auth website to a github based website, but that is still in progress. The other sites you mentioned are going to be copies of the same standard, maybe presented in a different fashion. So you can get it from any of those sites you prefer or any others.

The “most offiicial” copies:

Other “for learning” resources: GitHub - ohenley/awesome-ada: A curated list of awesome resources related to the Ada and SPARK programming language

2 Likes

ARG is the Ada Rapportaur Group, which produces/develops the standard.
The standards made available on Ada-auth and on AdaIC are the ISO standards, minus some formatting/styling imposed by the ISO.

Ada-Auth is the ARG’s site.
AdaIC is the Ada Information Clearinghouse.
So both of these are official Ada.

AdaCore is a company, not official Ada.

1 Like

Yes, Ada is a standardised language and has been implemented by multiple vendors.
Nowadays, only GNAT seems to implement the latest Ada specification.
Beyond GNAT, there are few closed-source compilers that provide older versions of Ada.
If you’re interested in what is still available, search for PTC or Janus/Ada or Greenhills.
There’s also the free and amicable HAC.

I don’t know of an up-to-date list.
Alire is the leading toolchain wrapper. For example, it uses the GNAT compiler and the GPRbuild build tool [1]
There’s also AURA although I haven’t seen it used [2].

This happens to be the simplest way to develop in Ada right now and was recommended by AdaCore (the corporate weight behind Ada) after they phased out the community version of their IDE called GNATStudio.
Please also check out ada_language_server [3].

A relic of the past trying to catch up with the present.
Ada-auth is the website where the Ada Reference Manual resides. A more-reliable mirror is available on Github [4], or you can self-host [5].
Ada-lang and this forum is a community website that aims to be a landing page for beginners.
AdaCore has high-quality learning materials, mostly the Learn portal [6], but also the Ada Gems [7].
The Learn.AdaCore is the closest thing Ada has to a “Getting started / Tour” section that would appear on a language website.
Ada also has a large corpus of old books, some of which are mentioned in an almost 30-yo FAQ [8] Nowadays, there seems to be one book that ‘s updated for the latest Ada and it’s John Barnes’ Programming in Ada 2022 [9]
There’s also a remarkably efficient Ada 2005 pill served by Richard Riehle [10]

[1] GPRbuild
[2] AURA toolchain
[3] Ada language server
[4] Ada Reference Manual - Github mirror
[5] Ada Reference Manual - self-hosting
[6] Learn @ AdaCore
[7] Ada Gems
[8] Ada FAQ
[9] John Barnes - Programming in Ada 2022
[10] Richard Riehle - Ada Distilled

2 Likes

This is a mine! Thank you all for the feedback!

So strictly speaking what is on the Ada-auth and AdaIC sites are not the ISO standards, but correspond to the sources from which the successive ISO standards were derived.

FYI, for those who like to have a hard copy of Ada RMs: all successive versions have been printed by Springer in their LNCS series. The consolidated Ada 2022 RM is currently being prepared (2022 RM + Corrigendum 1), once again an initiative of Ada-Europe.

2 Likes

Is the community version really being phased out ? There is considerable activity on github (probably due to the imminent release of the next version). Also, there is GnatStudio appimage version.

So today we announce the end of the GNAT Community releases with 2021 being the last one. We encourage all GNAT Community users to transition to Alire going forward. Full details and explanations on how to transition to Alire can be found at alire.ada.dev/transition_from_gnat_community.html.
~ A New Era For Ada/SPARK Open Source Community | The AdaCore Blog

That’s how I understood it when I read that post from almost 3 years ago.
I’m not sure what the difference is between GNAT Studio and GNAT Community, I never used any of them, but Alire is given as the go-to toolchain provider.

btw another nice birb

I believe ‘GNAT Community’ referred to the publicly available gnat compiler (as opposed to the GNAT Wavefront compiler for paying Adacore customers). GnatStudio (formerly known as Gnat Programming Studio or GPS) is a very good Ada IDE (also publicly available on Github).

As you know, Alire is the ‘new’ toolchain/‘ada project dependency’ provider.

The community edition of the GNAT compiler was indeed phased out. The community edition came packaged with GNAT Studio, so it sometimes confuses folks who conflate the two as one thing. GNAT Studio itself continues to be available publicly as you note.

Just a clarification, there are (and were) multiple publicly available gnat compilers. The Community version was provided via the Ada Core website and had the more restrictive pure GPL license. The FSF distributions of GCC also included GNAT (publicly / free) but with the much more friendly version of the GPL that had the linking exception (allowing you to use it without forcing GPL on your own code). The FSF versions were available then and still are today (Alire wraps around them currently).

Just wanted to clarify that Alire is “one” way to get the compiler. You can still get the compiler easily without Alire as it is packaged with GCC (so any means that allow you to get GCC can give you GNAT potentially).

I definitely recommend using Alire (especially for new folks), but just wanted to make sure you knew it wasn’t the only way. I get gnat through my package manager on msys2 for Windows and in my Linux distributions, no Alire involved.

Anyways sorry for all that, I just wanted to make sure you were aware of the above (you may already have been, so I apologize if so).

4 Likes

I also get gnat (and most ada projects) through my package manager on my Linux distribution (Arch), no Alire involved. Tho, I really should look into Alire more closely, at some point.

No problems at all. Thanks for the clarifications.

Kind of; there’s a formatter-tool that works on the source-doc and generates the .doc, .pdf, .info files.