Ada is a structured, statically typed, imperative, wide-spectrum, multi-paradigm, object-oriented high-level, ALGOL-like programming language, extended from Pascal and other languages. The language was developed in the late 1970s and early 1980s. Ada is named after Augusta Ada Byron (often now known as Ada Lovelace), daughter of the poet Lord Byron.
Ada has built-in language support for explicit concurrency, offering tasks, synchronous message passing, protected objects, and non-determinism. Ada incorporates the benefits of object-oriented languages without incurring the pervasive overheads.
Other notable features of Ada include: strong typing, inherent reliability, modularity mechanisms (packages), run-time checking, parallel processing, exception handling, the ability to provide abstraction through the package and private type, and generics.
Ada is particularly strong in areas such as real-time applications, low-level hardware access, and safety-critical software, as it has specialized design features, and high reliability. Most errors are detected at compile time and of those remaining many are detected by runtime constraints. While Ada was originally targeted at embedded and real time systems, the Ada 95 revision added support for object-oriented (including dynamic dispatch), numerical, financial, and systems programming. With its readability, scalability, and being designed for development of very large software systems, Ada is a good choice for open source development.
1. Ada 95: The Lovelace Tutorial by David A. Wheeler
Ada 95: The Lovelace Tutorial is an introduction to Ada 95. The book explains the basics of the Ada computer programming language and assumes that the reader has had some exposure to another algorithmic programming language (such as Pascal, C, C++, Fortran, or BASIC).
Lovelace is interactive and contains many short sections, most of which end with a question to help ensure the reader understands the material. Object-oriented facilities of Ada are covered in depth, and the essential features of Ada programming are given thorough treatment.
- Brief Introduction to Ada – What is Ada, simple program, use clauses, simple variable, integers, parameters and exceptions.
- Basic Ada Structure (Packages) – sections cover program units, declarations and bodies, packages, and compilation units.
- Ada Lexical Elements – looks at Ada from the bottom up.
- Procedures and Type Integer – the Ada type Integer is used to store integer values, declare a subprogram (procedure or function) declaration, subprogram Bodies and Local Variables.
- Statements (if, loop) – If statements, case statements, simple loops, and loop iteration schemes.
- Basic Types (Float, Boolean, subtypes, record) – type float, Boolean, creating types and subtypes, enumeration, arrays, records, and private and limited private types.
- Object-Oriented Programming – includes inheritance, dynamic dispatching, encapsulation, standard object-oriented format, abstract types and subprograms, and more.
- Introduction to String Types – examples types of strings, basics of type strings and more.
- Basic Input/Output – learn how to use more capabilities of Text_IO, especially how to read and write text files, line and file endings.
- Exceptions – learn how to define exceptions, how to raise exceptions, and how to handle exceptions.
- Generics – defining generics, generic formal parameters and more.
- Access Types – learn how to declare and use access types.
- Tasks and Protected Types.
- Ada-related Information.
- Ada Program Structure.
- Interfacing to Other Languages (including C and Java).
- Miscellaneous Ada Subjects.
- Sample Ada Program “Small”.
The electronic version of the Lovelace tutorial is released under the terms of the GNU General Public License (GPL).
2. Ada 95: The Craft of Object-Oriented Programming by John English
Ada 95: The Craft of Object-Oriented Programming is an introduction to Ada 95. It uses an example-driven approach which gradually develops small trivial programs into large case-study type programs.
The main focus of this book is on maintenance problems, and using object-oriented technology to write maintainable, extensible programs. Program design is introduced throughout the book, with hypothetical maintenance scenarios used to show design shortcomings, and revise them to accommodate maintenance needs. Practical issues such as debugging programs are tackled, and important Ada features not found in other languages are dealt with practically and early on in the text. Each chapter ends with useful exercises.
- Programming concepts.
- Fundamentals of Ada – includes program layout, context clauses, strings, and the beginnings of a simple calculator which is extended in later chapters.
- Statements – covers If statements, assignment statements, compound conditions, the case statement, range tests, the null statement, loops, and exception handling.
- Procedures, functions and packages – Zeller’s Congruence, declaring procedures and functions. The chapter also examines packages including child packages.
- Defining new data types – define data types which can be tailored fairly closely to the type of information that a particular program is concerned with modelling. The chapter covers standard data types, integers, subtypes, modular integers, real types, numeric literals, constants, and enumerations. The chapter ends with the type Boolean, and the type Character.
- Composite data types – record types, strings, declaring array types, multidimensional arrays and more.
- Exceptions – shows a programmer how to declare and re-raise exceptions, and obtain information about exceptions.
- Program design and debugging.
Abstract Data Types
- Private types – examines full and partial views, deferred constants, overloaded operators, the Use type clauses, and more.
- Designing with abstract data types – separate out the user interface, design the mode, define the view package, implement the ADT packages and more.
- Dynamic memory allocation – access types, linked lists, doubly linked lists, iterators, and more.
- Generics – generic packages, generic parameters and more.
- Building a calculator.
Designing extensible software
- Tagged types – variant records, tagged types, inheriting primitive operations and more.
- Polymorphism and dispatching – class-wide types, dispatching, abstract types, and stream input/output.
- Controlled types – memory leaks, user-defined finalisation, smart pointers, user-designed assignment, and testing controlled types.
- An object-oriented calculator.
- Designing a spreadsheet.
- Multitasking – looks at active objects, task types, communicating with tasks, sharing data between tasks, and more.
- Loose ends.
Permission is given to redistribute this work for non-profit educational use only.
3. Ada in Action by Do-While Jones
Ada in Action explores many selected advanced features and constructs of ADA and explains how to use them for the best results. It provides examples of how to write clear, correct, maintenance code and gives the reader re-usable components that can be used without modification in their own programs.
The book shows the reader to apply good software engineering principles and techniques to ADA programs through tested and proven methods. The text will be of benefit to military software and commercial software engineers and programmers, educational institutions and ADA programmers.
- Numeric Considerations – examines the POOR_COORDINATES package, the STANDARD_INTEGERS package, the non-existent STANDARD_FLOATS package, DIM_INT_32 package, generic INTEGER_UNITS package, generic FLOAT_UNITS package, DIM_FLOAT package, and more.
- IO Utilities – ASCII_UTILITIES package, TEXT_IO package, VIRTUAL_TERMINAL package, SCROLL_TERMINAL package, FORM_TERMINAL package, and more.
- Programming isn’t software engineering – looks at the show tool, the more tool, the write tool, the line tool, the search tool, and more.
- Testing software components and programs.
The book is released under an open source license.
4. Ada 95 Rationale – The Language – The Standard Libraries by John Barnes
Ada 95 Rationale: The Language – The Standard Libraries describes the rationale for Ada 95, the revised International Standard. It introduces Ada 95 and its powerful new mechanisms, and explains the rationale behind them.
The first part is an Introduction to Ada 95; it presents a general discussion of the scope and objectives of Ada 95 and its major technical features. The second part contains a more detailed chapter by chapter account of the Core language. The third part covers the various Annexes which address the predefined environment and the needs of specialized application areas.
- Evolution of Ada 95.
- Highlights of Ada 95 – works through the major new features of Ada 95 and the consequential benefits as seen by the general Ada user.
- Overview of the Ada Language – explores objects, types, classes and operations, statements, expressions and elaboration, system construction, multitasking, exception handling, low level programming, standard library, and application specific facilities.
The Core Language
- Lexical Elements – reserved words and identifiers, program text, pragmas, and requirements summary.
- Types and Expressions – types, classes, objects, and views, character types, numeric types, composite types, array types, record types, access types, type conversion, staticness, and more.
- Object Oriented Programming – describes the various ways in which object oriented programming is achieved in Ada 95.
- Subprograms – covers other relatively minor improvements to subprograms.
- Packages – a number of important changes to the language are addressed in this chapter.
- Visibility Rules – visibility and scope rules are rewritten to make them consistent and clearer, the use type clause is introduced for operators, renaming is now allowed for subprogram bodies, generic units and library units, and a number of minor improvements.
- Tasking – protected types, the Requeue statement, timing and more.
- Program Structure and Compilation Issues – provides more examples of important changes in the overall structural area of the language, and discusses other topics of a structural nature.
- Representation Issues.
- A Predefined Language Environment.
- Interface to Other Languages.
- Systems Programming.
- Real-Time Systems.
- Distributed Systems.
- Information Systems.
- Safety and Security.
This package may be freely copied and distributed, if accompanied by a statement, and provided that integral copies of all files are included (i.e. no change whatsoever is allowed).
Next page: Page 2 – Ada Distilled and more books
Pages in this article:
Page 1 – Ada 95: The Lovelace Tutorial and more books
Page 2 – Ada Distilled and more books
Page 3 – Ada 95 Reference Manual and more books
All books in this series:
|Free Programming Books|
|Ada||ALGOL-like programming language, extended from Pascal and other languages|
|Agda||Dependently typed functional language based on intuitionistic Type Theory|
|Arduino||Inexpensive, flexible, open source microcontroller platform|
|Assembly||As close to writing machine code without writing in pure hexadecimal|
|Awk||Versatile language designed for pattern scanning and processing language|
|Bash||Shell and command language; popular both as a shell and a scripting language|
|BASIC||Beginner’s All-purpose Symbolic Instruction Code|
|C||General-purpose, procedural, portable, high-level language|
|C++||General-purpose, portable, free-form, multi-paradigm language|
|C#||Combines the power and flexibility of C++ with the simplicity of Visual Basic|
|Clojure||Dialect of the Lisp programming language|
|COBOL||Common Business-Oriented Language|
|Coq||Dependently typed language similar to Agda, Idris, F* and others|
|Crystal||General-purpose, concurrent, multi-paradigm, object-oriented language|
|CSS||CSS (Cascading Style Sheets) specifies a web page’s appearance|
|D||General-purpose systems programming language with a C-like syntax|
|Dart||Client-optimized language for fast apps on multiple platforms|
|Dylan||Multi-paradigm language supporting functional and object-oriented coding|
|ECMAScript||Best known as the language embedded in web browsers|
|Eiffel||Object-oriented language designed by Bertrand Meyer|
|Elixir||Relatively new functional language running on the Erlang virtual machine|
|Erlang||General-purpose, concurrent, declarative, functional language|
|F#||Uses functional, imperative, and object-oriented programming methods|
|Factor||Dynamic stack-based programming language|
|Forth||Imperative stack-based programming language|
|Fortran||The first high-level language, using the first compiler|
|Go||Compiled, statically typed programming language|
|Groovy||Powerful, optionally typed and dynamic language|
|Haskell||Standardized, general-purpose, polymorphically, statically typed language|
|HTML||HyperText Markup Language|
|Icon||Wide variety of features for processing and presenting symbolic data|
|J||Array programming language based primarily on APL|
|Java||General-purpose, concurrent, class-based, object-oriented, high-level language|
|Julia||High-level, high-performance language for technical computing|
|Kotlin||More modern version of Java|
|LabVIEW||Designed to enable domain experts to build power systems quickly|
|LaTeX||Professional document preparation system and document markup language|
|Lisp||Unique features - excellent to study programming constructs|
|Logo||Dialect of Lisp that features interactivity, modularity, extensibility|
|Lua||Designed as an embeddable scripting language|
|Markdown||Plain text formatting syntax designed to be easy-to-read and easy-to-write|
|Objective-C||Object-oriented language that adds Smalltalk-style messaging to C|
|OCaml||The main implementation of the Caml language|
|Pascal||Imperative and procedural language designed in the late 1960s|
|Perl||High-level, general-purpose, interpreted, scripting, dynamic language|
|PHP||PHP has been at the helm of the web for many years|
|PostScript||Interpreted, stack-based and Turing complete language|
|Prolog||A general purpose, declarative, logic programming language|
|Python||General-purpose, structured, powerful language|
|QML||Hierarchical declarative language for user interface layout - JSON-like syntax|
|R||De facto standard among statisticians and data analysts|
|Racket||General-purpose, object-oriented, multi-paradigm, functional language|
|Raku||Member of the Perl family of programming languages|
|Ruby||General purpose, scripting, structured, flexible, fully object-oriented language|
|Rust||Ideal for systems, embedded, and other performance critical code|
|Scala||Modern, object-functional, multi-paradigm, Java-based language|
|Scheme||A general-purpose, functional language descended from Lisp and Algol|
|Scratch||Visual programming language designed for 8-16 year-old children|
|SQL||Access and manipulate data held in a relational database management system|
|Standard ML||General-purpose functional language characterized as "Lisp with types"|
|Swift||Powerful and intuitive general-purpose programming language|
|Tcl||Dynamic language based on concepts of Lisp, C, and Unix shells|
|TeX||Markup and programming language - create professional quality typeset text|
|Vala||Object-oriented language, syntactically similar to C#|
|VHDL||Hardware description language used in electronic design automation|
|VimL||Powerful scripting language of the Vim editor|
|XML||Rules for defining semantic tags describing structure ad meaning|