Ada Programming: Difference between revisions

From Wikibooks, open books for an open world
Jump to navigation Jump to search
[unreviewed revision][unreviewed revision]
Content deleted Content added
Replacing page with 'User:Kotla Mohsin Khan'
m Reverted edits by Kotla Mohsin Khan (Talk) to last version by Suruena
Line 1: Line 1:
<noinclude>{{programmingnav|Ada Programming}}
[[User:Kotla Mohsin Khan]]

{{bi}}

{{featured book}}


----
[[Image:Ada Lovelace 1838.jpg|right|caption|thumbnail|270px|[[w:Ada Lovelace|Augusta Ada King]], Countess of Lovelace.]]

__TOC__</noinclude>

{{Wikipublish}}

Welcome to the '''Ada Programming''' tutorial at Wikibooks. This is the first [[Ada Programming/Tutorials|Ada tutorial]] covering the [[Ada Programming/Ada 2005|Ada 2005]] standard. If you are a beginner you will learn the latest standard &mdash; if you are a seasoned Ada user you can see what's new.

Current Development Stage for '''Ada Programming''' is "{{stage|75%|Jun 2, 2008}}". At this date, there are more than 200 pages in this book, which makes '''Ada Programming''' one of the largest [[Computer programming|programming]] wikibooks<ref>[http://en.wikipedia.org/wikistats/wikibooks/EN/Wikibooks_EN.htm wikistats], [[:Category:Ada Programming]] or [[/All Chapters]])</ref>.

But still there is always room for improvement &mdash; do help us to expand '''Ada Programming'''. Even beginners will find areas to participate.

== About Ada ==
{{Wikipedia|Ada programming language}}
Ada is a programming language named after [[w:Ada Lovelace|Augusta Ada King]], Countess of Lovelace, which is suitable for all development needs.

Ada has built-in features that directly support [[w:Structured Programming|structured]],
[[w:Object-oriented programming|object-oriented]], [[w:Generic programming|generic]], [[w:Distributed computing|distributed]] and [[w:Concurrent computing|concurrent]] programming.

Ada is a good choice for [[w:Rapid_application_development|Rapid Application Development]], [[w:Extreme_Programming|Extreme Programming (XP)]],
and [[w:Free Software|Free Software]] development.

=== Programming in the large ===

Ada puts unique emphasis on, and provides strong support for, good [[w:Software Engineering|software engineering]] practices that scale well to very large software
systems (millions of lines of code, and very large development teams). The following
language features are particularly relevant in this respect:

* An extremely strong, static and safe '''[[w:Type system|type system]]''', which allows the programmer to construct powerful abstractions that reflect the real world, and allows the compiler to detect many logic errors before they become bugs.
* '''[[w:Modularity (programming)|Modularity]]''', whereby the compiler directly manages the construction of very large software systems from sources.
* '''[[w:Information hiding|Information hiding]]'''; the language separates interfaces from implementation, and provides fine-grained control over visibility.
* '''Readability''', which helps programmers review and verify code. Ada favours the reader of the program over the writer, because a program is written once but read many times. For example, the syntax bans all ambiguous constructs, so there are no surprises, in accordance with the Tao of Programming's [[w:Principle_of_least_astonishment|Law of Least Astonishment]]. (Some Ada programmers are reluctant to talk about ''source code'' which is often cryptic; they prefer ''program text'' which is close to English prose.)
* '''[[w:Write once, compile anywhere|Portability]]''': the language definition allows compilers to differ only in a few controlled ways, and otherwise defines the semantics of programs very precisely; as a result, Ada source text is very portable across compilers and across target hardware platforms. Most often, the program can be recompiled without any changes<ref>[http://portal.acm.org/affiliated/ft_gateway.cfm?id=958426&type=pdf&coll=portal&dl=acm&CFID=15151515&CFTOKEN=6184618 paper by Eurocontrol (PDF, 160 kB) on Portability]</ref>.
* '''Standardisation''': standards have been a goal and a prominent feature ever since the design of the language in the late 1970's. The first standard was published in 1980, just 3 years after design commenced. Ada compilers all support the exact same language; there are no dialects.

Consequences of these qualities are superior '''reliability''', '''reusability''' and
'''maintainability'''. For example, compared to programs written in [[Programming:C|C]],
programs written in Ada 83 contain ten times fewer bugs, and cost half as much to develop in the first place<ref>[http://www.adaic.com/whyada/ada-vs-c/cada_art.html Study by Stephen F. Zeigler on Ada vs. C]</ref>.
Ada shines even more in software maintenance, which often accounts for 80% of the total
cost of development. With support for object-oriented programming, Ada95 brings even
more cost benefits, although no serious study comparable to Zeigler's has been published.

=== Programming in the small ===

In addition to its support for good software engineering practices,
which are applicable to general-purpose programming, Ada has powerful
specialised features supporting low-level programming for real-time, safety-critical
and [[w:Embedded system|embedded]] systems. Such features include, among others,
machine code insertions, address arithmetic, low-level access to memory, control over bitwise representation of data, bit manipulations, and
a well-defined, statically provable concurrent computing model called the
[[w:Ravenscar profile|Ravenscar Profile]].

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, defense,
medical, railroad, and nuclear industries.

=== The Language Reference Manual ===
{{Wikipedia|ISO 8652}}
The Ada Reference Manual (RM) is the official language definition. If you have a problem, if no one else can help, and you can find it, maybe you should read the RM <small>(albeit often a bit cryptic for non-language-lawyers)</small>. For this reason, all complete <small>(not draft)</small> pages in '''Ada Programming''' contain links into the appropriate pages in the RM.

This tutorial covers ''[[w:ISO 8652|Ada Reference Manual &mdash; ISO/IEC 8652:1995(E) with Technical Corrigendum 1:2001 and Amendment 1:2007 &mdash; Language and Standard Libraries]]'', colloquially known as ''Ada 2005'' or just ''Ada''.

You can browse the complete Reference Manual at http://www.adaic.com/standards/05rm/html/RM-TTL.html

There are two companion documents:
* The [http://www.adaic.com/standards/05aarm/html/AA-TTL.html 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 [http://www.adaic.com/standards/05rat/html/Rat-TTL.html Rationale for Ada 2005], an explanation of the features of the language.

The [http://www.adaic.com/standards Ada Information Clearinghouse] also offers the older Ada 83 and Ada 95 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 [http://www.ada-auth.org Ada Conformity Assessment Authority]. On this site, you can also see the list of "Ada Issues" raised by other people.

=== Ada Conformity Assessment Test Suite ===
{{Wikipedia|ISO 18009}}
Unlike other programming languages, Ada compilers are officially tested, and only those which pass this test are accepted, for military and commercial work. This means that all Ada compilers behave (almost) the same, so you do not have to learn any dialects. But because the Ada standard allows the compiler writers to include some additions, you could learn a cool new feature only to find out that your favorite compiler does not support it...

== Programming in Ada ==
<div class="noprint">
Reading a document online is often quite cumbersome. So if you just started you can also download [[/All Chapters|All Chapters]] ([[Media:Ada Programming.pdf|PDF version]]) {{stage short|50%|Sep 23, 2005}} and print them out.
</div>

=== Getting Started ===

Where to get a compiler, how to compile the source, all answered here:

* [[Ada Programming/Basic|Basic Ada]] &mdash; {{stage|100%|Sep 22, 2005}}, '''Read Me First!'''
* [[Ada Programming/Installing|Finding and Installing Ada]] &mdash; {{stage|100%|Sep 22, 2005}}
* [[Ada Programming/Building|Building an Ada program]] &mdash; {{stage|100%|Sep 22, 2005}}

=== Language Features ===

These chapters look at the broader picture, introducing you to the main Ada features in a tutorial style.

* [[Ada Programming/Control|Control Structures]] &mdash; {{stage|100%|Dec 14, 2005}}
* [[Ada Programming/Type System|Type System]] &mdash; {{stage|75%|Jan 5, 2006}}
* [[Ada Programming/Strings|Strings]] &mdash; {{stage|75%|Jan 5, 2006}}
* [[Ada Programming/Subprograms|Subprograms]] &mdash; {{stage|75%|Jan 5, 2006}}
* [[Ada Programming/Packages|Packages]] &mdash; {{stage|75%|Jun 2, 2008}}
* [[Ada Programming/Input Output|Input Output]] &mdash; {{stage|50%|Jun 2, 2008}}
* [[Ada Programming/Exceptions|Exceptions]] &mdash; {{stage|100%|Jan 5, 2006}}
* [[Ada Programming/Generics|Generics]] &mdash; {{stage|100%|Jan 5, 2006}}
* [[Ada Programming/Tasking|Tasking]] &mdash; {{stage|75%|Jun 2, 2008}}
* [[Ada Programming/Object Orientation|Object Orientation]] &mdash; {{stage|50%|Jan 5, 2006}}
* [[Ada Programming/Types/access|Memory Management]] &mdash; {{stage|75%|Jan 5, 2006}}
* [[Ada Programming/Ada 2005|New in Ada 2005]] &mdash; {{stage|100%|Jan 5, 2006}}
* [[Ada Programming/Containers|Containers]] &mdash; {{stage|50%|Jan 5, 2006}}
* [[Ada Programming/Tips|Ada Programming Tips]] &mdash; {{stage|25%|Jan 5, 2006}}
* [[Ada Programming/Errors|Common Programming Errors]] &mdash; {{stage|25%|Jun 1, 2008}}

=== 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/]]
** [[/Algorithms/Chapter 1|Chapter 1]]
** [[/Algorithms/Chapter 6|Chapter 6]]
** [[/Algorithms/Knuth-Morris-Pratt pattern matcher/|Knuth-Morris-Pratt pattern matcher]]
** [[Algorithm_implementation/Search/Binary_search#Ada|Binary search]]
* [[/Error handling/]]
* [[/Function overloading/]]
* [[/Mathematical calculations/]]
* [[/Statements/]]
** [[/Control/]]
* [http://www.adaic.org/standards/95lrm/html/RM-4-4.html Expressions]
* [[/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.
* [[Ada Programming/Lexical elements|Lexical elements]] &mdash; {{stage|100%|Dec 14, 2005}}
** [[Ada Programming/Keywords|Keywords]] &mdash; {{stage|75%|Jan 6, 2008}}
** [[Ada Programming/Delimiters|Delimiters]] &mdash; {{stage|75%|Jan 10, 2005}}
* [[Ada Programming/Operators|Operators]] &mdash; {{stage|100%|Jan 10, 2005}}
* [[Ada Programming/Attributes|Attributes]] &mdash; {{stage|25%|Jan 10, 2005}}
* [[Ada Programming/Pragmas|Pragmas]] &mdash; {{stage|25%|Jan 10, 2005}}

=== Predefined Language Libraries ===

The library which comes with Ada in general and [[w:GNAT|GNAT]] in particular. Ada's built-in library is extensive and well structured. These chapters serve as a reference for Ada's built-in libraries.

* [[Ada Programming/Libraries/Standard|Standard]] &mdash; {{stage|25%|Sep 22, 2005}}
* [[Ada Programming/Libraries/Ada|Ada]] &mdash; {{stage|25%|Sep 22, 2005}}
* [[Ada Programming/Libraries/Interfaces|Interfaces]] &mdash; {{stage|25%|Sep 22, 2005}}
* [[Ada Programming/Libraries/System|System]] &mdash; {{stage|25%|Sep 22, 2005}}
* [[Ada Programming/Libraries/GNAT|GNAT]] &mdash; {{stage|25%|Sep 22, 2005}}

=== Other Language Libraries ===

Other libraries which are not part of the standard but freely available.

* [[Ada Programming/Libraries|Libraries]]
** [[Ada Programming/Libraries/MultiPurpose|Multi Purpose]]
** [[Ada Programming/Libraries/Container|Container Libraries]]
** [[Ada Programming/Libraries/GUI|GUI Libraries]]
** [[Ada Programming/Libraries/Distributed|Distributed Objects]]
** [[Ada Programming/Libraries/Database|Database]]
** [[Ada Programming/Libraries/Web|Web Programming]]
** [[Ada Programming/Libraries/IO|Input/Output]]
* [[Ada Programming/Platform|Platform]]
** [[Ada Programming/Platform/Linux|Programming Ada 95 in Linux]]
** [[Ada Programming/Platform/Windows|Programming Ada 95 in Windows]]
** [[Ada Programming/Platform/VM|Programming Ada 95 in Virtual Machines (Java, .NET)]]

== External resources ==

* [[Ada Programming/Portals|Open-source portals]]
* [[Ada Programming/Tutorials|Web Tutorials]]
* [[Ada Programming/Web 2.0|Web 2.0]]

== Collections ==

=== Printable Versions ===

<noinclude>
{{Print version|Ada Programming/All Chapters|1,839 kb}}
{{PDF version|Ada Programming|2,663 kb, 243 pages|Ada Programming}}
</noinclude>
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 : [[Ada Programming/All Chapters|Show HTML]] <small>(1,839 kb)</small> &mdash; [[Media:Ada Programming.pdf|Download PDF]] <small>(2,663 kb, 243 pages)</small>
; Keywords : [[Ada Programming/All Keywords|Show HTML]] <small>(470 kb)</small> &mdash; [[Media:Ada Programming Keywords.pdf|Download PDF]] <small>(290 kb, 59 pages)</small>
; Operators : [[Ada Programming/All Operators|Show HTML]] <small>(232 kb)</small> &mdash; [[Media:Ada Programming Operators.pdf|Download PDF]] <small>(189 kb, 27 pages)</small>

=== Source Code ===

The Source from the Book is available for [https://sourceforge.net/project/showfiles.php?group_id=124904 download] and [http://wikibook-ada.sourceforge.net/html/index.html 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==
<div class="references-small" style="-moz-column-count:2; column-count:2;">
<references/>
</div>

== Further reading ==

=== Ada 2005 textbooks ===
*{{cite book
| author = John Barnes
| title = Programming in Ada 2005
| month = June
| year = 2006
| publisher = Addison Wesley
| isbn = 0-32-134078-7
| url = http://www.pearsonhighered.com/educator/academic/product/0,,0321340787,00%2Ben-USS_01DBC.html
}}
*{{cite book
| author = Nell Dale, John W. McCormick
| title = Ada Plus Data Structures: An Object Oriented Approach
| year = 2007
| edition = 2nd Edition
| publisher = Jones and Bartlett
| isbn = 0763737941
| url = http://www.jbpub.com/catalog/9780763737948/
}}
*{{cite book
| author = Alan Burns, Andy Wellings
| title = Concurrent and Real-Time Programming in Ada
| month = July
| year = 2007
| publisher = Cambridge University Press
| isbn = 9780521866972
| url = http://www.cambridge.org/uk/catalogue/catalogue.asp?isbn=9780521866972
}}

=== Manuals and guides ===
* [http://www.adaic.org/docs/95style/html/contents.html Ada Quality & Style Guide:] Guidelines for Professional Programmers (October 1995)
* [http://www.adaic.com/standards/05rat/html/Rat-TTL.html Rationale for Ada 2005], by John Barnes (2007)
* [http://www.adaic.com/standards/05rm/html/RM-TTL.html Ada 2005 Reference Manual] (2007)

=== High-Integrity Software ===
* ISO/IEC TR 15942:2000, ''[http://polaris.dit.upm.es/~ork/documents/adahis.pdf Guide for the use of the Ada programming language in high integrity systems]''. ISO Freely Available Standards [http://standards.iso.org/ittf/PubliclyAvailableStandards/]
* ISO/IEC TR 24718:2005, ''[http://www.sigada.org/ada_letters/jun2004/ravenscar_article.pdf Guide for the use of the Ada Ravenscar Profile in high integrity systems]''. ISO Freely Available Standards [http://standards.iso.org/ittf/PubliclyAvailableStandards/]
*{{cite book
| author = John Barnes
| month = April
| year = 2003
| title = High Integrity Software: The SPARK Approach to Safety and Security
| publisher = Addison-Wesley
| isbn = 0-321-13616-0
| url = http://www.praxis-his.com/sparkada/sparkbook.asp
}}

== External links ==
<div class="references-small" style="-moz-column-count:2; column-count:2;">
=== Resources ===
* [http://www.adapower.com AdaPower] &mdash; Ada Tools and Resources
* [http://www.adaworld.com Ada World] &mdash; Everything about Ada
* [http://www.adacore.com/home/ada_answers/ Ada Answers] &mdash; Building better software with Ada
* [news://comp.lang.ada comp.lang.ada] ([http://groups.google.com/group/comp.lang.ada Google groups]) &mdash; International Usenet newsgroup

=== Research and user groups ===
* Journals:
** ''[http://www.sigada.org/ada_letters/ Ada-Letters]''
** ''[http://www.ada-europe.org/journal.html Ada User Journal]'' <small>([http://www.ada-europe.org/AUJ/ archive])</small>
* International Conferences/Workshops:
** [http://portal.acm.org/browse_dl.cfm?linked=1&part=series&idx=SERIES176&coll=portal&dl=ACM International Real-Time Ada Workshop (IRTAW)]
** [http://portal.acm.org/toc.cfm?id=SERIES332 ACM SIGAda international conference on Ada]
** [http://www.math.unipd.it/ae2008 Reliable Software Technologies &mdash; Ada-Europe Conference]
** [http://www.cs.kuleuven.be/~dirk/ada-belgium/events/06/060226-fosdem.html Ada "Developers Room" at FOSDEM] <small>([http://listserv.cc.kuleuven.be/cgi-bin/wa?SUBED1=adafosdem&A=1 mailing list])</small>
* Local conferences:
** [http://www.cs.kuleuven.ac.be/~dirk/ada-belgium/events/local.html Ada-Belgium Conference]
** [http://adaspain.unican.es/JTAS_XV.html Ada-Spain Technical Day]
** [http://www.ada-uk-conference.co.uk/ Ada Conference UK] <small>(videos: [http://www.adacore.com/home/ada_answers/lectures/ada_uk07/ 2007], [http://www.adacore.com/home/ada_answers/lectures/ada_uk06 2006])</small>

=== Associations ===
* [http://www.acm.org/sigada/ ACM SIGAda] &mdash; ACM Special Interest Group on Ada
* [http://www.ada-europe.org/ Ada-Europe]
* [http://www.ada-deutschland.de/ Ada Germany]
* [http://www.ada-ru.org/ Ada Russia]

=== Free online books/courses ===
<!--TODO: categorize into books and web based courses -->
* [http://www.computer-books.us/ada95.php Computer-Books.us] &mdash; Online Ada books
* ''[http://www.pegasoft.ca/resources/boblap/book.html The Big Online Book of Linux Ada Programming]''
* ''[http://www1.acm.org/sigs/sigada/education/pages/Ada-Distilled-07-27-2003-Color-Version.pdf Ada Distilled]''
* ''[http://www.adahome.com/Ammo/Cplpl2Ada.html Ada&nbsp;95: A guide for C and C++ programmers]''
* ''[http://www.cs.kuleuven.ac.be/~dirk/ada-belgium/aia/contents.html Ada in Action]''
* ''[http://www.seas.gwu.edu/~adagroup/sigada-website/barnes-html/intro.html Introducing Ada&nbsp;95]''
* ''[http://www.scism.sbu.ac.uk/law/lawhp.html Learn Ada on the Web]''
* ''[http://goanna.cs.rmit.edu.au/~dale/ada/aln.html Quick Ada]''
* ''[http://www.adahome.com/articles/1998-01/ar_intro.html Introducing Ada]''
* ''[http://stwww.weizmann.ac.il/g-cs/benari/books/index.html Ada for Software Engineers]'' &mdash; Free textbook originally published by John Wiley
* ''[http://www.cmis.brighton.ac.uk/~je/adacraft/ Ada&nbsp;95: The Craft of Object-Oriented Programming]'' &mdash; Free textbook originally published by Prentice Hall
</div>

== Authors and contributors ==

This Wikibook has been written by:

<div class="references-small" style="-moz-column-count:2; column-count:2;">
* [[User:Krischik|Martin Krischik]] ([[Special:Contributions/Krischik|Contributions]])
* [[User:ManuelGR|Manuel Gómez]] ([[Special:Contributions/ManuelGR|Contributions]])
* [[User:suruena|Santiago Urueña]] ([[Special:Contributions/suruena|Contributions]])
* C.K.W. Grein ([[Special:Contributions/53.122.157.1|Contributions]])
* Bill Findlay ([[Special:Contributions/82.41.187.188|Contributions]])
* [[User:Bseidel|B. Seidel]] ([[Special:Contributions/Bseidel|Contributions]])
* [[User:Sjw|Simon Wright]] ([[Special:Contributions/Sjw|Contributions]])
* [[User:Alsocal|Allen Lew]] ([[Special:Contributions/Alsocal|Contributions]])
* [[User:oleszkie|John Oleszkiewicz]] ([[Special:Contributions/oleszkie|Contributions]])
* [[User:Nikai|Nicolas Kaiser]] ([[Special:Contributions/Nikai|Contributions]])
* [[User:Larry Luther|Larry Luther]] ([[Special:Contributions/Larry Luther|Contributions]])
* [[User:GeorgBauhaus|Georg Bauhaus]] ([[Special:Contributions/GeorgBauhaus|Contributions]])
* [[User:Sam|Samuel Tardieu]] ([[Special:Contributions/Sam|Contributions]])
* [[User:Ludovic Brenta|Ludovic Brenta]] ([[Special:Contributions/Ludovic Brenta|Contributions]])
* Ed Falis
* Pascal Obry
* Unnamed Hero ([[Special:Contributions/80.156.44.1|Contributions]])
</div>

If you wish to contribute as well you should read [[Talk:Ada Programming/Contributing|Contributing]] and join us at the [[Talk:Ada Programming/Contributors lounge|Contributors lounge]].

<noinclude>
[[Category:Ada Programming| ]]
[[Category:Featured Computing Books]]
{{alphabetical|A}}
{{subject|Ada programming language|Programming languages}}
{{programming language}}
[[es:Programación en Ada]]
[[fr:Programmation Ada]]
[[it:Ada]]
</noinclude>

Revision as of 03:20, 26 July 2008

Template:Programmingnav

Template:Bi



Augusta Ada King, Countess of Lovelace.
This book is currently being worked on by the Wikipublish Wikiproject. It has been judged to be of high enough quality to be published and distributed. All authors of this book are welcome to help with the publishing effort.

Welcome to the Ada Programming tutorial at Wikibooks. This is the first Ada tutorial covering the Ada 2005 standard. If you are a beginner you will learn the latest standard — if you are a seasoned Ada user you can see what's new.

Current Development Stage for Ada Programming is "75% developed  as of Jun 2, 2008 (Jun 2, 2008)". At this date, there are more than 200 pages in this book, which makes Ada Programming one of the largest programming wikibooks[1].

But still there is always room for improvement — do help us to expand Ada Programming. Even beginners will find areas to participate.

About Ada

Ada is a programming language named after Augusta Ada King, Countess of Lovelace, which is suitable for all development needs.

Ada has built-in features that directly support structured, object-oriented, generic, distributed and concurrent programming.

Ada is a good choice for Rapid Application Development, Extreme Programming (XP), and Free Software development.

Programming in the large

Ada puts unique emphasis on, and provides strong support for, good software engineering practices that scale well to very large software systems (millions of lines of code, and very large development teams). The following language features are particularly relevant in this respect:

  • An extremely strong, static and safe type system, which allows the programmer to construct powerful abstractions that reflect the real world, and allows the compiler to detect many logic errors before they become bugs.
  • Modularity, whereby the compiler directly manages the construction of very large software systems from sources.
  • Information hiding; the language separates interfaces from implementation, and provides fine-grained control over visibility.
  • Readability, which helps programmers review and verify code. Ada favours the reader of the program over the writer, because a program is written once but read many times. For example, the syntax bans all ambiguous constructs, so there are no surprises, in accordance with the Tao of Programming's Law of Least Astonishment. (Some Ada programmers are reluctant to talk about source code which is often cryptic; they prefer program text which is close to English prose.)
  • Portability: the language definition allows compilers to differ only in a few controlled ways, and otherwise defines the semantics of programs very precisely; as a result, Ada source text is very portable across compilers and across target hardware platforms. Most often, the program can be recompiled without any changes[2].
  • Standardisation: standards have been a goal and a prominent feature ever since the design of the language in the late 1970's. The first standard was published in 1980, just 3 years after design commenced. Ada compilers all support the exact same language; there are no dialects.

Consequences of these qualities are superior reliability, reusability and maintainability. For example, compared to programs written in C, programs written in Ada 83 contain ten times 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 80% of the total cost of development. With support for object-oriented programming, Ada95 brings even more cost benefits, although no serious study comparable to Zeigler's has been published.

Programming in the small

In addition to its support for good software engineering practices, which are applicable to general-purpose programming, Ada has powerful specialised features supporting low-level programming for real-time, safety-critical and embedded systems. Such features include, among others, machine code insertions, address arithmetic, low-level access to memory, control over bitwise representation of data, bit manipulations, and a well-defined, statically provable concurrent computing model called the Ravenscar Profile.

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, defense, medical, railroad, and nuclear industries.

The Language Reference Manual

The Ada Reference Manual (RM) is the official language definition. If you have a problem, if no one else can help, and you can find it, maybe you should read the RM (albeit often a bit cryptic for non-language-lawyers). For this reason, all complete (not draft) pages in Ada Programming contain links into the appropriate pages in the RM.

This tutorial covers Ada Reference Manual — ISO/IEC 8652:1995(E) with Technical Corrigendum 1:2001 and Amendment 1:2007 — Language and Standard Libraries, colloquially known as Ada 2005 or just Ada.

You can browse the complete Reference Manual at http://www.adaic.com/standards/05rm/html/RM-TTL.html

There are two companion documents:

The Ada Information Clearinghouse also offers the older Ada 83 and Ada 95 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.

Ada Conformity Assessment Test Suite

Unlike other programming languages, Ada compilers are officially tested, and only those which pass this test are accepted, for military and commercial work. This means that all Ada compilers behave (almost) the same, so you do not have to learn any dialects. But because the Ada standard allows the compiler writers to include some additions, you could learn a cool new feature only to find out that your favorite compiler does not support it...

Programming in Ada

Reading a document online is often quite cumbersome. So if you just started you can also download All Chapters (PDF version) 50% developed  as of Sep 23, 2005 and print them out.

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.

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.

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.

Predefined Language Libraries

The library which comes with Ada in general and GNAT in particular. Ada's built-in library is extensive and well structured. These chapters serve as a reference for Ada's built-in libraries.

Other Language Libraries

Other libraries which are not part of the standard but freely available.

External resources

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

Further reading

Ada 2005 textbooks

  • John Barnes (2006). Programming in Ada 2005. Addison Wesley. ISBN 0-32-134078-7. {{cite book}}: Unknown parameter |month= ignored (help)
  • Nell Dale, John W. McCormick (2007). Ada Plus Data Structures: An Object Oriented Approach (2nd Edition ed.). Jones and Bartlett. ISBN 0763737941. {{cite book}}: |edition= has extra text (help)
  • Alan Burns, Andy Wellings (2007). Concurrent and Real-Time Programming in Ada. Cambridge University Press. ISBN 9780521866972. {{cite book}}: Unknown parameter |month= ignored (help)

Manuals and guides

High-Integrity Software

Resources

Research and user groups

Associations

Free online books/courses

Authors and contributors

This Wikibook has been written by:

If you wish to contribute as well you should read Contributing and join us at the Contributors lounge.


xx-? Update your userbox to the unified standard (see documentation).