Though somewhat long-in-the-tooth and seemingly past its prime for some uses, the Ada programming language has reached a new milestone as the International Organization for Standardization (ISO) has approved Ada 2012 as a standard.
The Ada Resource Association (ARA) and Ada-Europe on Dec. 18 announced the approval and publication of the latest version of the Ada programming language by the Geneva-based ISO, breathing new life into the language heavily used in the 1980s and 1990s for mission-critical systems.
Ada 2012 brings significant enhancements to Ada, most notably in the area of "contract-based programming."
New features here include the ability to specify preconditions and postconditions for subprograms, and invariants for private, encapsulated types. These take the form of Boolean expressions that can be interpreted, under programmer control, as runtime conditions to be checked. The contract-based programming features fit in smoothly with Ada's object-oriented programming model, and support the type substitutability guidance supplied in the Object-Oriented Technologies and Related Techniques Supplement (DO-332) to the new avionics software safety standard DO-178C/ED-12C.
"AdaCore is pleased to learn that the Ada 2012 standard has been formally approved and published by ISO," Edmond Schonberg, a co-founder of AdaCore and the head of the ISO group that conducted the Ada 2012 work, told eWEEK. "This makes Ada 2012 the first mainstream language to include standard support for contract-based programming, a development style that is becoming increasingly important for systems with demanding requirements for reliability, safety or security."
Other new features in Ada 2012 include enhancements to the containers library, additional expressiveness through features such as conditional expressions and more powerful iterators, and support for multicore platforms. This includes task affinities and the extension of the Ravenscar profile—standardized in Ada 2005 as an efficient and predictable tasking subset for high-integrity real-time systems—to multiprocessor and multicore environments.
"Contract-based programming in effect allows the developer to specify software requirements as part of the source program, where they can be verified by the compiler or checked at runtime," Schonberg said. "An example of a contract is a function's preconditions [what the function assumes] and its postconditions [what it promises].
"The new news here, which distinguishes Ada from other languages, is that contracts are part of the standard language syntax and semantics where they can be exploited by the compiler," he continued. "Further, this feature is integrated carefully into the existing language framework, for example, the object-oriented programming facility, which is a major advance in the state of the art."
Ada 2012 is a big step in the state of the art in programming languages, Schonberg explained. "The new features answer real user needs, and help cement Ada's reputation as a language of choice for systems where reliability, safety and security are paramount," he said.
Ada is typically used for complex systems. Ada 2012 can be applied both in industry for production software development, and in academia for teaching and research. Indeed, Ada is seeing significant use worldwide in high-integrity, safety-critical, high-security domains, including commercial and military aircraft avionics, air traffic control, railroad systems and medical devices. With its embodiment of modern software engineering principles, Ada is a good teaching language for both introductory and advanced computer science courses and research, particularly in the area of real-time technologies.