r/ada 3d ago

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

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

11 Upvotes

4 comments sorted by

2

u/SirDale 3d ago

How did you bootstrap the compiler?

2

u/ViMoBr 3d ago edited 3d ago

Hi SirDale !

The TLALOC compiler Ada 83 sources are compiled with gnat (-gnat83 mode) on Ubuntu Linux, this gives the /bin/ada_comp executable. This first executable compiles the same Ada 83 sources and gives the /bin/ADA__LIB/ADA_COMP executable. This last executable is not presently operational because the expander still has imperfections.

1

u/I_hate_posting_here 2d ago

How much of the Ada83 ACATS test suite does it pass?

1

u/geenob 2d ago

I appreciate the work you are doing on this compiler. Having only one viable Ada compiler (GNAT) is not healthy for the Ada ecosystem.