Ada

From EDM2
Jump to: navigation, search
Ada Lovelace (1815 - 1852)
The programming language is her namesake, more info here.

Ada is a modular, statically typed, structured object-oriented and procedural language in the Algol family that was introduced in the early 80s by Groupe Bull and was largely modelled on Niklaus Wirth's Pascal and Modula. It added more safety features and stronger support for concurrency, with later versions of the language adding object orientation.

History

Ada is usually described as having been developed at the behest of the USA Department of Defence, but that is not correct. The DoD did set out for a language but their initial proposal was for a PL/I based system. French company Bull started work on a toolset for embedded "safe computing" in 1977 (or possibly slightly earlier) based around a Pascal superset called LIS (Language d'Implementation de Systèmes) that was used in-house as a system language.

"Safe computing" was a buzzword in the 1970s when people came to realise that most tool chains relied on code quality and debugging rather than standards, structures and safety features. This was not a huge issue on the relatively small programs and the business, scientific and military environments that that early computers were used in. When programs started to get more complex and toolchains longer, and computers increasingly started to take control of machinery, what did increasingly start to happen were accidents that could not be attributed to direct failures in hardware or by operators but to errors in the controlling software. It did not just affect the code that was written for the task but often the errors originated from the tools used to build the code in question, or even the tools used to build the tools.

These kinds of accidents started to cost not just money, but lives and that lead to the interest in adding safety-critical features to computer development tools. In the case of Bull, designer Jean David Ichbiah started to modify not just the tools used but the programming language itself, adding stronger structural types and later a module system lifted from Wirth's Modula but also more explicit safety features and more emphasis on standardisation of the environment (libraries, bindings and such) than the minimalistic Pascal and Modula had. This allowed the conformance testing of not just the compiler itself but all the tools used to develop the end product which was vital in regards to the safety features. Wirth and Dijkstra et. al. focused squarely on the language and ignored the libraries and modules, regarding these as add-ons or implementation specific features. In the real world these all affected the performance of the language as far as safety was concerned and therefore required as rigorous a testing as the compiler itself.

The US Department of Defence had a very real world problem in the 1970s in that they wanted to cut down on the multitudes of languages used in the products they operated. In the mid 70s they were estimated to be between 300 and 400 incompatible variants, this lead to numerous problems in regards to incompatibility and continuity. Not only were companies not able to work on products delivered by companies no longer with us due to lack of expertise and or tools in a specific language variant, in many cases only one company could bid on some projects due to the same reason, meaning they could more or less dictate prices.

This made the organisation keen to standardise on a single language that in addition had some Safe Computing features. The DoD had with some success managed to force companies to standardise on a language in the 1950s with COBOL but that language was really only suitable for generic business application development. They tried in the early 1970s to standardise on a safe version of PL/I called SPL/I. The project failed primarily due to a lack of language flexibility but also to problems in implementation although it survived in a limited way in the US Navy as a language for signal processing. But as a side-note, some of the design features and stated requirements of the original IBM PL/I and Ada are strangely similar.

A separate initiative inside the DoD lead to the creation of the High Order Language Working Group that went on to spell out the requirements of a new programming language that would fit the requirements of the DoD for an embedded language in a document called Strawman. This document still shows a strong PL/I influence but after consultations with people in the language research field, including Dijkstra and Wirth. The proposals slowly nudged towards a more structured language and the 1977 document called Ironman shows a stronger tendency towards what can only be described as a Pascal like language. Tests by HOLWG concluded that no existing language fitted the requirements of the Strawman document, but that Pascal, ALGOL 68 or PL/I made for "good starting points".

Ada on OS/2

Initially there were a number of implementations for OS/2, all of them validated and most sold rather briskly so got fairly routinely updated, Ada was in fact surprisingly popular tool on the operating system for custom programming jobs initially, because many bought OS/2 1.x as an "Ada development system on steroids" since the OS got around various shortcomings of DOS in regards to memory while offering the same choice of Ada compilers.

This changed with the appearance of the free compiler front-end GNAT, its development had been paid for by the USA DoD and so was its validation and the OS/2 version, as the initial 32 bit port for 386 microprocessors got a lot of attention from the developers and was all in all a fairly solid release especially for the first few years. Even though in practice it was still as slow and bloated as on the UNIX workstations it originally came from not the least since it used the GCC as a code generator that at the time had a horrific 80386 back end. Despite speed advantages and superior development environments in general from the commercial offerings the market for paid alternatives mostly vanished overnight even though the OS/2 market was still growing at the time, the Windows and DOS markets however escaped better since the DOS version of GNAT newer worked as expected and a fully usable Windows version did not show up for a number of years.

Implementation problems

The problematic feature of Ada is not the language itself, but the size of the combined language and standardised libraries and bindings, this does not affect the performance of outputted code, programs written in Ada should in that respect reach the same speed as other languages in the Algol family like C++ or Oberon if similarly implemented, it is just that the development and verification of the full system takes a lot of time and this has lead to companies shipping language sub-sets, delivering compilers late, often by years and stifled open source development since it is not a tool that a small group of enthusiasts can take on in their free time easily. There are only two free tools out there, one was financed entirely by the USA Department of Defence and the other a subset that is the result of 15 years of work by an individual. In addition compilers used for certain markets are supposed to be officially certified which is a costly project that deters both small firms and open source projects.

Note that despite the safety features built into the Ada language itself it is not a inherently safe language per se in the same way that "Safe Modula-2" and Zonnon are, but people are working on an Ada subset that is. Also note that the name is always "Ada" and not the all caps ADA as is common to see in the wild, the language is named after Ada Byron, the Countess of Lovelace, in other words Ada is a girls name, not an acronym.

Derivatives of the language include VHDL.

OS/2 implementations

  • Alsys Ada / Thomson Software Products Ada
  • Artek Ada/Lattice Ada - Announced but probably never shipped
  • Borland/TopSpeed Ada - More or less fully developed, but after JPI bought the rights from Borland they decided against marketing it since they thought the PC Ada market had disappeared.
  • GNAT - Open Source
  • IntegrAda/386 - Rebranded Janus/Ada compiler with some AETECH bundled tools
  • Intermetrics Ada - Announced, possibly never released.
  • Janus/Ada 83
  • Janus/Ada 95
  • OC Systems Ada - Announced for OS/2 PowerPC edition but probably never released.

Libraries and bindings

Foreign libraries with Ada bindings

Editors with Ada support

  • Boxer - Included by default
  • BRIEF - Included by default
  • FTE - Has support for syntax highlighting, code folding and syntax-aware auto-indent
  • NEdit - XFree86 - Autoindent, autocomplete and syntax highlighting.

DOS implementations

  • 80X'86 DOS - Commercial
  • ADA+SQL - Hybrid of a Win95 IDE and a DOS compiler, took over from AVLAda9x
  • ADA/ED - Open Source - Interpreted predecessor to GNAT
  • Alsys Ada - Used VCPI so incompatible with OS/2 and Windows
  • Alsys FirstAda - Commercial
  • Aonix Ada - Commercial
  • Artek Ada - Commercial
  • AVLAda9x - Takes over from SMALLAda, adds some Ada95 constructs - Freeware
  • GW-Ada/Ed for DOS
  • Janus/Ada 83 - Commercial
  • Janus/Ada 95 - Commercial
  • Integer Ada - Commercial
  • Meridian Ada - Commercial
  • Meridian Open Ada - Commercial
  • MIPS ASAPP - Commercial
  • SMALLAda - Ada Subset - Freeware
Database binding
Editor support
  • Boxer - Included by default
  • BRIEF - Included by default
  • FTE - Has support for syntax highlighting, code folding and syntax-aware autoindent.

Win-OS/2 implementations

  • Alsys Ada - Commercial
  • Integer Ada - Commercial

Local articles

Standards

The Ada standards specification was initially developed by the USA DoD and later ratified by ANSI. They are now governed by the ISO.

  • Ada 83 / ISO-8652:1987 - Initial standard
  • Ada 95 / ISO-8652:1995
    • Mostly upwards compatible, adds object-oriented extensions.
    • Ada information clearinghouse has most of the documentation that relates to the standard available for download.
    • Ada Semantic Interface Specification is an add-on to the Ada 95 standard
  • Ada 2005 / ISO/IEC 8652:1995/Amd 1:2007
    • Referred to as both "Ada 2005" and "Ada 95 Amendment 1"
  • Ada 2012 / ISO/IEC 8652:2012
    • Latest standard, changes are mostly to the environment (Unicode 32-bit, Special needs etc), but some syntactical and expression changes as well alongside a slight strengthening of the object orientation.

Publications

  • The Programming Language Ada: Reference Manual
  • John G. Barnes: Programming in Ada - Addison-Wesley 1989, ISBN 0-201-17566-5
  • Norman Cohen: Ada as a Second Language 2nd Edition - McGraw-Hill 1994, ISBN 0-07-011607-5
Interviews

Links