Since Java success, garbage collectors have proved to be valuable for the construction of software. Complex designs with intensive memory usage can benefit from implicit memory deallocation.
In the context of real-time applications, garbage collectors have been traditionally avoided because of efficiency and schedulability considerations. However, during the past decade the industry has invested substantial resources to develop garbage collectors appropriate for real-time systems, like Real-Time Java implementations, embedded systems and hardware assisted methods. While Ada implementations have traditionally provided memory management facilities beyond unchecked deallocation and controlled types, support for garbage collection has been ignored by most.
During my last university years, I worked on an academic project consisting in the modification of the GNU Ada compiler (GNAT) to incorporate precise recovery of implicitly deallocated data. The approach taken relies on a new implementation-defined pragma used to mark data types for implicit deallocation.
Legacy sources using explicit deallocation can be easily adapted for garbage collection, or for simultaneous use of both deallocation paradigms, thus allowing to evaluate the impact of the garbage collector on existing applications.My professors and I decided to release most of the work hoping to encourage others to continue. We still hold the code because it is highly experimental.
However, if you are interested in it or the project itself, I would gladly solve any question or even help you to get started. In 2007 the project was presented in one of the Ada-Spain conferences and later in Ada-Europe.
Here you can find the slides and most of the documentation licensed under the GNU Free Documentation License except for an article we published. It's copyright belongs to Springer-Verlag. Although most of the documentation is in Spanish, the article is a good overall picture of what we achieved. I must admit that the main document is quite a heavy reading but I provide some English contents taken from it.
Programs must be written for people to read, and only incidentally for machines to execute Abelson & Sussman, SICP
Right before my first programming assignment at my University, we all had big expectations regarding the language we had to work with. Back then Visual Basic, C++ and Delphi were the big guys, but I as much as my colleagues agreed, maybe that was a too much for starting. C seemed the most promising option, it was after all, the language of the hackers. All the real macho programmers could code any thing they dreamed in it.
You cannot imagine our surprise when we found out that our assignments were to be made in something called Ada. Greatly concerned about the quality of our education, we started our own research.
Ada is probably one of the best programming languages ever made. It is by far my favourite one, although I admit that depending on the task at hand, other languages might fit better. For some quick and dirty jobs specially scripting, I would prefer Python or TCL/TK, which by the way, are excellent tools for what they are intended for. However! For building really robust software, Ada is the only thing out there I really trust.
Seriously! This world would be a better place if more applications were written with it. Sadly, real life seems to be harder on good things and Ada is no exception. Don't expect to see it in late evening news, Ada is a rare gemstone disregarded among many professionals. Even studying it alone will make you a better programmer.
It will be quite stubborn with every line of code you write, force you to rethink your design and maybe even drive you mad, but only for your own sake. If you programmed before in C you will understand the real difference between easy to write (alas C, C++) or easy to read (Ada). After experiencing an scripting language you might even believe that only idiots or bad programming languages need to specify a variable type. But there are many examples where strong typing can make a real difference if you care about your software failing.
I highly recommend you to go through these slides if you want to understand how or why a properly designed language specification can avoid software bugs. That is where Ada shines. Its whole syntax has been carefully crafted to avoid many common errors and ambiguous situations were many successful languages will say everything is OK just to stab you later in your back during run-time. That is what strong typing is all about.
Ada was the main topic of my last University years. I thought it would be even more amazing if it had garbage collection since that had become a hot topic in language design. Hence I made some research about using garbage collection within Ada and released all the work.
If you are interested in this subject you might consider these links: