Ada for C/C++ Developers: Development Environments

Lessons Learned: Get them fresh off the boat

(Skip this anecdote if you want to get straight to work the info)

When I first started learning C/C++, it was just out of curiosity and I didn’t want to spend any money on expensive compilers.  Visual C++ and Borland C++ Builder were not cheap for a secondary school student; after all, I had just spent $30 a C++ book.  Luckily the book came with a floppy disk containg the example code and a copy of Borland Turbo C++ 4.5, an older MS-DOS C++ compiler.  It was perfect for someone like myself just getting started, and with that tool I was able to explore the world of programming: console apps, pointers, linked lists and all of that good stuff.

Back then Borland was a really popular compiler vendor, but at some point Microsoft tipped the scale and stole the developer tools market.  One reason that Microsoft took over is that Visual Basic proved to be easier than Delphi (“Visual Pascal”) for new programmers in the corporate world.  Another very important reason, however, is that Microsoft went after the future developers through outreach programs in academia.  When I entered the university, Microsoft sold a bundled package of Microsoft Office Professional and Microsoft Visual Studio 6.0 to incoming students for $99. All the software that we would need during our four years was available at low cost.  In my final year in school, Microsoft was giving away Visual Studio .NET for free to each student in computer science and computer engineering programs.  I can only assume they were trying to quash Java with .NET.

When I first looked into Ada back in 1999, there didn’t seem to be much to choose from for someone just getting started.  It seems though that the commerical Ada vendors have come to their senses and made their tools available for open-source use.  It is a matter of survival perhaps?

Ada Development Environments

Mostly likely you’ll be using GNAT unless your company is asking you to learn Ada on a specific vendor’s platform.  I’m not going to argue the merits of integrated development environments versus command-line development.  My personal method is to use a text editor and the command-line for small programs, and for large projects I’ll normally fall back on an IDE due to the object browsing capabilities.  When I frst started with Ada, I used the command-line and a text editor only because I felt overwhelmed by the options in the IDE.  Now that I have a better feeling for the jargon used in Ada, the IDEs make more sense and are quite usable.  If you don’t like development environments, then stop reading here and just install GNAT if you’re on UNIX or Cygwin + GNAT if you’re on Windows.


GNAT Programming Studio (GPS)

GPS comes from AdaCore, the company that developers the GNAT tool chain.  If you create a free account on their Libre web page, you can then generate a custom download package that bundles not only GPS and GNAT, it also GTK+ binding, libraries for XML and CORBA, and more.  Compared to Visual Studio or Eclipse, GPS is very light-weight, and if you are comfortable with the Ada language you will become proficcient with this tool very quickly.  The only downside I see with it is that there is no auto-completion nor a “intellisense” system that displays possible choices.

Platforms: Windows .NET, Windows x86, Linux x86, Linux86 64-bit

Cost: (registration required) Free for open-source developers, but for commercial users a yearly subscription is required

Opinion: the best IDE available to non-commercial users

gps


AdaGIDE

AdaGIDE was the popular IDE before GPS was made available to open-source developers. While it resembles Emacs visually, it is a regular editor and you don’t have to memorize a bunch of Ctrl or Alt key combinations.  AdaGIDE supports integration with GNAT, syntax highlighting, and all of the features needed for developing small Ada software projects.

Platforms: Windows

Cost: free

Opinion:  a light-weight IDE that should suit the needs for any hobbyists running on older hardware


GNATBench

Also AdaCore, GNATBench is simply a plug-in for the popular Eclipse IDE.  It uses an exisiting install of GNAT on your machine, and then utilizes Eclipse to manage, edit and build your software.  I had high-hopes for this plug-in because unlike GPS, GNATBench has an “intellisense” like-feature.  Though it was easy to install this plug-in in my existing Eclipse setup, Eclipse reported errors and Java run-time exceptions after I started editing some Ada source files.  I don’t know where the fault is, but I never get such errors when I edit Erlang files in ErlIDE.  I want to write code and solve problems, not debug Eclipse, so I am not using this tool anymore.

Platforms: any platform that supports both Eclipse and GNAT

Cost: free

Opinion: a lot of potential, but still too unstable for my liking

eclipse


Hibachi ADT – unavailable

As far as I can tell, this is a project that was suposed to take off and fill a gap in the market, but it appears dead in the water since 1997.  Perhaps Aonix’s and AdaCore’s plug-ins have caused the developers of this project to hang up their shoes?

Opinion: Noting really to say, it seems like a dead project


Cygwin – not really and development envirnoment…but an option

I don’t think the Cygwin project needs any introduction.  If you want a UNIX-like environment to develop Ada programs in, simply select the GNAT binaries during installation and you should be set to go.  Edit Ada files with your favorite text editor, debug with GDB — it should all be familiar.

Platforms: Windows

Cost: free

Opinion:  If you know UNIX, this is a great way to get started with Ada and learn the build process


AonixADT

Aonix has their own Ada compiler called ObjectAda, and AonixADT is a plug-in for Eclipse that can be used with ObjectAda or GNAT. I have downloaded the plug-in, but I have not installed it or evaluated it yet.  The build data is 2007, and here we are in 2009?  I’m a bit skeptical of Eclipse plug-ins that don’t keep up with the times.  I blame Mentor and their Nucleus RTOS development environment for this skepticism.

Platforms: any that support Eclipse and ObjectAda or GNAT

Cost: (registration required) free

Opinion: none yet, I haven’t tried this one


SPARKAda

SPARK is a subset of the Ada language as well as a platform that is quite popular in the commercial Ada development community.  A lot of PR about Ada in the news these days revolves around SPARK, such as the NSA Tokeneer [DrDobbs, AdaCore] project. From the vendor’s web page:

SPARK gives confidence in the correctness of code – it is verifiable. Early detection and prevention of defects reduces the cost of verification and validation. SPARK is a very portable language and has minimal runtime system requirements.

SPARK is a commercial tool aimed at real systems and embedded platforms, so there is no free version for developing application software.  A demo version for training and education is available, however.

Platforms: Demo version is available for Windows, Linux, Mac OS X 10.4

Cost: (registration required) free demo version; contact sales for the commercial package

Opinion:  none yet, though I should take a look at the demo version sooner or later


There are probably other development environments available, especially in the commercial realm, but the above were the ones that turned up at the top of Google searches when I was researching the Ada development environment terrain.  While all are not quite as polished as Visual Studio or NetBeans, it is definately a good start!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s