# Ada Bootstrap compiler funding thanks to nlnet!

**URL:** https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014
**Category:** General
**Created:** [April 23, 2025, 4:09pm UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014 "2025-04-23T16:09:02Z")
**Posts on this page:** 13
**Page:** 3

<div class="post-metadata">

### Author: ![OneWingedShark](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/onewingedshark/32/305_2.png) [@OneWingedShark](https://forum.ada-lang.io/u/OneWingedShark)
#### Post date: [May 10, 2025, 1:31am UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/41 "2025-05-10T01:31:11Z")

</div>

> [@VMo](#):
>
> But Forth has no explicit mean of Ada stack variables structuring.

I don’t know why that should be a huge problem: you already know how big the stack-frame-equivalent is, so you pop that amount off the stack, just as you would clean up the stack-frame for a normal compiler.

> [@VMo](#):
>
> The most direct way I found is to write custom macro assembly text which is assembled to native machine code with program data structuring explicited. This text can be read and visually verified.

There’s several ways you can do it:

1. [Using a High Level Language as a Cross Assembler](https://dl.acm.org/doi/pdf/10.1145/954269.954277)
2. Target a VM
  1. [P-Code is simple](https://en.wikipedia.org/wiki/P-code_machine), but less well-known now;
  2. JVM is ubiquitous, making for a good cross-compile bootstrap platform;
  3. [DOTNET](https://www.ecma-international.org/wp-content/uploads/ECMA-335_6th_edition_june_2012.pdf) is interesting, but more limited (there are implementations on non-MS OSes);
  4. Forth/SeedForth, very simple and small;

3. [LOLITA - A Low Level Intermediate Language for Ada+](https://dl.acm.org/doi/pdf/10.1145/3304133.3304167)  
(This paper is the only ref to it, though, TTBOMK)
4. Interpret/execute the IR directly.  
(This is technically what Graal/Truffle does, though the IR is essentially the AST.)

---

<div class="post-metadata">

### Author: ![Efraim](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/efraim/32/683_2.png) [@Efraim](https://forum.ada-lang.io/u/Efraim)
#### Post date: [May 11, 2025, 11:41am UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/42 "2025-05-11T11:41:20Z")

</div>

> For the second point, I would not bet that Ada/Ed can be augmented to the required fraction of an x95 Ada compiler to process and code an early available gnat source.
> 
> I feel this enterprise will require a considerable endeavor.

Ah, but do you think it would be doable working on it for a year full-time?

---

<div class="post-metadata">

### Author: ![VMo](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/v/47e85d/32.png) [@VMo](https://forum.ada-lang.io/u/VMo)
#### Post date: [May 11, 2025, 5:35pm UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/43 "2025-05-11T17:35:39Z")

</div>

My intuition is not very positive about the possibility to add enough Ada95 features to be able to compile an available earliest gnat. But advice from others are welcome and probably better than mine.

Nonetheless, a first task would be to recompile the Ada/Ed with a modern C compiler (standard normed C, not C++ or featured C). It seems there is no present Ada/Ed functional downloadable executable suite of it. for example the

> **[GitHub - GunterMueller/Ada\_Ed: Ada/Ed is a translator-interpreter for Ada 83...](https://github.com/GunterMueller/Ada_Ed)**
>
> Ada/Ed is a translator-interpreter for Ada 83 intended as a teaching tool. Ada/Ed was developed at New York University, as part of a long-range project in language definition and software prototyping.

is mainly a source archive (there are some execs though, but compiled for what ? )  
This link is particularly interesting giving information on the internals of Ada/Ed (specially the files ais, tre, aix, axq and so on) :

[Ada\_Ed/c/Schonberg\_Shields-From\_Prototype\_to\_Efficent\_Implementation-1985.pdf at 92667454af111cecf1fb23af470d6edec666385a · GunterMueller/Ada\_Ed · GitHub](https://github.com/GunterMueller/Ada_Ed/blob/92667454af111cecf1fb23af470d6edec666385a/c/Schonberg_Shields-From_Prototype_to_Efficent_Implementation-1985.pdf)

There are six execs to compile :

- adafront the parser,
- adagen the VM code generator,
- adabind the code segments binder,
- adaexec the interpreter,
- adacomp a command interface,
- adalib a librairian.

I had succeeded in recompiling the imain.c by curiosity, so the rest can almost surely be recompiled but there are compilation errors to correct to comply with today C.

> IMPORTANT NOTE  
> This task of cleanly rebuilding and re-documenting Ada/Ed could be fairly useful by itself, that would give another open source Ada 83 working compiler (which will be mentioned on **Ada83 memory** site [ada83.org](http://ada83.org) of course). With a minimum of documentation complement on use options, it could be used again.

When updating C code to compile, perhaps you will figure out the symbol table structure or the tree representation. It is probably very specialized for Ada 83, so is extending it for some Ada 95 features possible ? Mystery. And for what Ada 95 features ? It depend on the early gnat content. All this has to be studied carefully. But I feel like not very optimistic. How do others feel ?

---

<div class="post-metadata">

### Author: ![HawkerFrake](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/h/3e96dc/32.png) [@HawkerFrake](https://forum.ada-lang.io/u/HawkerFrake)
#### Post date: [May 19, 2025, 3:00am UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/44 "2025-05-19T03:00:14Z")

</div>

> [@Efraim](#):
>
> I saw @HawkerFrake mention plan9 and I’d be interested in learning more about what might be required to have it run there. I don’t want to make changes that hurt portability if it’s possible.

Thank you for the consideration. My interest lies in industrial automation, or any kind of machine really, using Plan 9 (9front fork) as the core platform from the engineering workstation down to the control CPU. I’ve done some work in this area and my interest is to use Ada in place of ST.

The main hurdles are the non standard Plan 9 C library and compiler suite which is mostly C99 compliant with some unique features. No in-line assembler. Lex and yacc. Not POSIX nor Unix. MIT license. These aren’t deal breakers, plenty of “foreign” C software has been ported such as Ghostscript and Python.

Plan 9 was designed for cross platform and all the source and tools are included by default. This means any supported architecture can bootstrap another just by changing the environment variable “objtype” and building. Ideally, a Plan 9 Ada bootstrap compiler should be completely architecture agnostic allowing one to set objtype=x and run the build. This is the hard part as you would need to emit a binary for each arch. Though it’s possible to use the same cross platform technique Go uses: emit Plan 9 assembler. Then hijack the existing linkers to build the target binary. Though, at that point you’re close to a native Ada compiler, which would be interesting.

As for the entirety of Gnat and the Ada standard library, I can’t speak for that. I am not sure what is needed to enable Gnat if it heavily relies on GCC and GNU C libraries. Might be a show stopper but I would like to investigate what is possible. In the mean time I Have to brush up on my Ada.

---

<div class="post-metadata">

### Author: ![Irvise](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/i/7ba0ec/32.png) [@Irvise](https://forum.ada-lang.io/u/Irvise)
#### Post date: [June 1, 2025, 3:31pm UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/45 "2025-06-01T15:31:16Z")

</div>

@Efraim I just remembered something that may be of your interest/may help you in this quest. The [HAC Ada Compiler](https://github.com/zertovitch/hac), written by @zertovitch. It is an Ada"-like" language which is designed to be scriptable/quickly compiled. It may help you understand some of the compilation techniques and structures used in an Ada compiler 🙂

Best regards,  
Fer

---

<div class="post-metadata">

### Author: ![zertovitch](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/zertovitch/32/90_2.png) [@zertovitch](https://forum.ada-lang.io/u/zertovitch)
#### Post date: [June 7, 2025, 6:10am UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/46 "2025-06-07T06:10:13Z")

</div>

> [@Irvise](#):
>
> The [HAC Ada Compiler](https://github.com/zertovitch/hac), written by @zertovitch. It is an Ada"-like" language which is designed to be scriptable/quickly compiled.

Just a clarification: HAC is better than an Ada-like tool: it supports an Ada subset. For instance programs developed with HAC compile with GNAT and work the same.

---

<div class="post-metadata">

### Author: ![NumberSix](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/numbersix/32/195_2.png) [@NumberSix](https://forum.ada-lang.io/u/NumberSix)
#### Post date: [June 8, 2025, 8:07am UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/47 "2025-06-08T08:07:48Z")

</div>

As a HAC user, the fact that an Ada compiler can compile an HAC source is a major advantage over other scripting solutions.

What’s more, in standalone mode, HAC is fast and reliable (tested on thousands of lines of code).

Finally, in an Ada program, if a scripting system is required, HAC seems to me to be far superior to Python (this snake’s name is not taken at random) because, beyond the similar paradigm, HAC is much easier to integrate at build…

my 2¢ 🙂

---

<div class="post-metadata">

### Author: ![dmitry-kazakov](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/dmitry-kazakov/32/522_2.png) [@dmitry-kazakov](https://forum.ada-lang.io/u/dmitry-kazakov)
#### Post date: [June 8, 2025, 8:32am UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/48 "2025-06-08T08:32:31Z")

</div>

Unfortunately HAC in its present state is unsuitable for scripting:

- You cannot create a HAC package/unit programmatically from Ada. See [Module Objects — Python 3.13.4 documentation](https://docs.python.org/3/c-api/module.html#c.PyModule_Create). This is one minimal requirement for calling Ada host’s subprograms back from HAC as _HAC subprograms_ passing HAC arguments in and out. Raising exceptions on the HAC context. You can do this in Python API, you can do this in Julia API.
- You cannot browse HAC packages/units for callable entries. This a requirement to call HAC from Ada as an Ada subprogram passing arguments forth an back.
- HAC exceptions do not propagate in Ada. E.g. in Python API you can check the pending error state and raise an Ada exception.

P.S. I would gladly use HAC for scripting as I do with Python and Julia. Moreover it would be great if GNAT Studio added HAC scripting too. Presently GNAT Studio uses messy Python like I do.

---

<div class="post-metadata">

### Author: ![Max](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/max/32/21_2.png) [@Max](https://forum.ada-lang.io/u/Max)
#### Post date: [July 6, 2025, 11:48am UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/49 "2025-07-06T11:48:01Z")

</div>

~~I found gnat 1.64 (10 Dec. 1993) for linux here~~: Arh, it’s binary ☹

> **[Index of /index/files/index/unix/Linux/util/languages](https://ftp.funet.fi/index/files/index/unix/Linux/util/languages/)**

---

<div class="post-metadata">

### Author: ![Irvise](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/i/7ba0ec/32.png) [@Irvise](https://forum.ada-lang.io/u/Irvise)
#### Post date: [September 19, 2025, 3:36pm UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/50 "2025-09-19T15:36:54Z")

</div>

Hi @Efraim!

Do you have any news, struggles or updates you could share with us? 🙂

Best regards,  
Fer

---

<div class="post-metadata">

### Author: ![kevlar700](https://forum.ada-lang.io/user_avatar/forum.ada-lang.io/kevlar700/32/40_2.png) [@kevlar700](https://forum.ada-lang.io/u/kevlar700)
#### Post date: [September 19, 2025, 4:11pm UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/51 "2025-09-19T16:11:10Z")

</div>

This page may or may not be interesting

> **[The Compiler Validation Project](https://web.archive.org/web/20020218233443/http://www.cs.nyu.edu/validation/pubs.html)**

---

<div class="post-metadata">

### Author: ![Irvise](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/i/7ba0ec/32.png) [@Irvise](https://forum.ada-lang.io/u/Irvise)
#### Post date: [April 18, 2026, 8:03pm UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/52 "2026-04-18T20:03:45Z")

</div>

Hi,

I recently found that there is ANTLR v4 syntax for Ada 2012 and Ada 2022 among others. 2022 syntax was added very very recently [Missing Ada 2022 · Issue #4757 · antlr/grammars-v4 · GitHub](https://github.com/antlr/grammars-v4/issues/4757) This could be extremely helpful so that the parsing could be fully automated.

Best regards,  
Fer

---

<div class="post-metadata">

### Author: ![HawkerFrake](https://forum.ada-lang.io/letter_avatar_proxy/v4/letter/h/3e96dc/32.png) [@HawkerFrake](https://forum.ada-lang.io/u/HawkerFrake)
#### Post date: [May 26, 2026, 9:34pm UTC](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014/53 "2026-05-26T21:34:31Z")

</div>

Is there any news or developments for this project? I cannot even find a project website or anything beyond the nlnet announcement.

A simple Ada bootstrap compiler written in c89/99 that emits c89/99 would be the ticket.

[Previous page](https://forum.ada-lang.io/t/ada-bootstrap-compiler-funding-thanks-to-nlnet/2014.md?page=2)
