Ada Programming
Ada Programming
About Ada
Ada is a programming language suitable for all development needs.
It has built-in features that directly support structured, object-
oriented, generic, distributed and concurrent programming.
Standardisation: standards have been a goal and a prominent feature ever since the design of the language in the
late 1970s. The first standard was published in 1980, just 3 years after design commenced. Ada compilers all
support exactly the same language; the only dialect,SPARK, is merely an annotated subset and can be compiled
with an Ada compiler.
Consequences of these qualities are superior reliability, reusability and maintainability. For example, compared to programs
written in C, programs written in Ada 83 contain"70% fewer internal fixes and 90% fewer bugs", and cost half as much to develop in
the first place.[3] Ada shines even more in software maintenance, which often accounts for about 80% of the total cost of
development. With support for object-oriented programming, Ada 95 may bring even more cost benefit, depending on how objects
are used; although no serious study comparable to Zeigler's has been published.
Other features include restrictions (it is possible to restrict which language features are accepted in a program) and features that help
review and certify the object code generated by the compiler
.
Several vendors provide Ada compilers accompanied by minimal run-time kernels suitable for use in certified, life-critical
applications. It is also possible to write Ada programs which require no run-time kernel at all.
It should come as no surprise that Ada is heavily used in the aerospace, defence, medical, railroad, and nuclear industries.
This tutorial covers Ada Reference Manual — ISO/IEC 8652:2012(E) Language and Standard Libraries, colloquially known as
Ada 2012 or just Ada.
The Annotated Reference Manual, an extended version of the RM aimed at compiler writers or other persons who
want to know the fine details of the language.
The Rationale for Ada 2012, an explanation of the features of the language.
The Ada Information Clearinghousealso offers the older Ada 83, 95, and 2005 standards and companion documents.
The RM is a collective work under the control of Ada users. If you think you've found a problem in the RM, please report it to the
Ada Conformity Assessment Authority. On this site, you can also see the list of "Ada Issues" raised by other people.
Programming in Ada
Getting Started
Where to get a compiler, how to compile the source, all answered here:
Language Features
These chapters look at the broader picture, introducing you to the main Ada features in a tutorial style.
Expressions
Control Structures
Type System
Strings
Subprograms
Packages
Input Output
Exceptions
Generics
Tasking
Object Orientation
Contract Based Programming
Memory Management (Access Types)
New in Ada 2005
New in Ada 2012
Containers
Interfacing to other Languages
Coding Standards
Ada Programming Tips
Common Programming Errors
Computer Programming
The following articles are Ada adaptations from articles of the Computer programming book. The texts of these articles are language
neutral but the examples are all Ada.
Algorithms
Chapter 1
Chapter 6
Knuth-Morris-Pratt pattern matcher
Binary search
Error handling
Function overloading
Mathematical calculations
Statements
Control
Variables
Language Reference
Within the following chapters we look at foundations of Ada. These chapters may be used for reference of a particular keyword,
delimiter, operator and so forth.
Lexical elements
Keywords
Delimiters
Operators
Attributes
Aspects
Pragmas
Restrictions
Standard
Ada
Interfaces
System
Besides the Standard Library, compilers usually come with a built-in library
. This chapter describes theGNAT library in particular.
GNAT
External Libraries
This section is a reference of third-party Ada libraries which are not part of the compiler predefined environment but are freely
available.
Libraries
Multi Purpose
Container Libraries
GUI Libraries
Distributed Objects
Database
Web Programming
Input/Output
Platform specific
External resources
Open-source portals
Web Tutorials
Web 2.0
Collections
Printable Versions
The following are collection pages. All collection pages are comprised of groups of the already available pages. You can use them for
printing or to gain a quick overview. Please note that those pages are partly very long.
Tutorial
Show HTML (1,839 kb) — Download PDF (2,663 kb, 243 pages)
Keywords
Show HTML (470 kb) — Download PDF (290 kb, 59 pages)
Operators
Show HTML (232 kb) — Download PDF (189 kb, 27 pages)
Source Code
The Source from the Book is available for download and online browsing. The latter allows "drill down", meaning that you can
follow the links right down to the package bodies in the Ada runtime library
.
References
1. See wikistats (http://en.wikipedia.org/wikistats/wikibooks/EN/Wikibooks_EN.htm) , Category:Book:Ada Programming
or /All Chapters
2. Gaetan Allaert, Dirk Craeynest, Philippe W aroquiers (2003). "European air traffic flow management: porting a large
application to GNU/linux". Proceedings of the 2003 annual ACM SIGAda international conference on Ada .
SIGAda'03. pp. 29–37.doi:10.1145/958420.958426. ISBN 1-58113-476-2.
http://www.sigada.org/conf/sigada2003/SIGAda2003-CDROM/SIGAda2003-Proceedings/p29-allaert.pdf . Retrieved
2009-01-02. Paper by Eurocontrol (PDF, 160 kB) on portability.
3. Stephen F. Zeigler (1995-03-30).Comparing Development Costs of C and Ada. http://archive.adaic.com/intro/ada-
vs-c/ada-vs-c.html. Retrieved 2009-01-02. "Our data indicates that Ada has saved us millions of development
dollars.".
Further reading
High-Integrity Software
ISO/IEC TR 15942:2000,Guide for the use of the Ada programming language in high integrity systems . ISO Freely
Available Standards [1]
ISO/IEC TR 24718:2005,Guide for the use of the Ada Ravenscar Profile in high integrity systems
. ISO Freely
Available Standards [2]
John Barnes (April 2003).High Integrity Software: The SPARK Approach to Safety and Security. Addison-Wesley.
ISBN 0-321-13616-0.
External links
Ada-Belgium Conference
Ada-Spain Technical Day
Resources Ada Conference UK (videos: 2009, 2007, 2006)