Saturday, August 11, 2012

AdaTutor - Introduction

What Is Ada?

Ada is a modern language designed for programming large scale and real time systems. Ada is also an excellent general purpose language.  It has many new features which help prevent errors and detect errors earlier.

However, Ada is much more than a programming language.  It's also a different programming philosophy.  Beware of learning just "Ada syntax"; you'll wind up writing Basic-like (or Pascal-like, etc.) programs that happen to be coded in Ada.  If you do that, you'll lose the many benefits of Ada.  Unfortunately, you won't see why Ada is a different programming philosophy until later in this course.  (By the time we get to packages and information hiding, you'll be an enthusiastic convert.)  In the meantime, please take our word for it: Ada is a whole new programming philosophy, not just another language.

Because of its many features, Ada is relatively complicated.  There's about seven times as much to learn as Pascal.  However, the effort pays great dividends.  Once you learn the language, Ada programs are easier to write, easier to read, and much easier to modify a month or a year later.

A Very Brief History of Ada

Ada was named for Augusta Ada Byron, countess of Lovelace and daughter of the poet Lord Byron.  She worked with Charles Babbage on his Analytical Engine, and has been called the world's first programmer.

Ada was invented because the U.S. Department of Defense (DoD) realized that none of the existing languages was very suitable for real-time control of large, embedded systems.  An embedded system is a computer system inside a product other than a computer, such as an intelligent oven or a guided missile.  Programs for embedded systems are usually written with a cross compiler, a compiler that runs on one machine and produces code for another.  Cross compilers are often called compilers for short.

In 1977 the DoD issued a Request for Proposal to develop a new language; the leading four contenders were designated Blue, Red, Yellow, and Green.  Eventually Green was selected to be Ada; it was designed by the company Honeywell Bull under the direction of Jean Ichbiah of France.

The name "Ada" is no longer a trademark of the Department of Defense.

Ada has been evolved several times since Ada 83, they are Ada 95, Ada 2005 and the latest version Ada 2012, and with corrections of Technical Corrigendum 1 in 2016.

What Are Ada 83 and Ada 95?

The Ada language was standardized in 1980, and revised in 1983 and in 1995.  The present version of Ada is called Ada 95, the previous version, Ada 83.

During the early 1990's, it wasn't certain exactly when in the 90's the second revision of Ada would be completed, so the upcoming revision was referred to as Ada 9X.  Any references you see elsewhere to "Ada 9X" mean Ada 95.

Since March 1997, all validated Ada compilers are Ada 95 compilers; the validation on all Ada 83 compilers has expired.  The meaning of "validation" will be discussed very shortly.

AdaTutor will point out the differences between Ada 83 and Ada 95 as we go along.  All of the programs and examples in this course are designed to compile and run with either an Ada 83 or an Ada 95 system, except for the examples specifically labeled as Ada 95 only.

Question

In the author's opinion, which one of the following statements is true?

  1. Ada is simpler than Pascal.
  2. Although Ada was designed for embedded systems, it makes a good general purpose language.
  3. Basic, C, and Pascal programs can easily be translated into good Ada programs.
  4. In languages that are simpler than Ada, errors are usually detected earlier than in Ada.

What's a "Validated" Ada Compiler?

Ada compilers (and cross compilers) are now validated by the National Institute of Standards and Technology (NIST).  If a compiler conforms exactly to the standard, and isn't a subset or superset of Ada, it's validated after passing an extensive suite of tests (called the Ada Compiler Validation Capability, or ACVC).  The ACVC is updated periodically.

Since March 1997, all validated compilers conform to the newer Ada 95 standard, because the validation on all Ada 83 compilers has expired.

Question

True or False?  Subsets and supersets of standard Ada may be called "Ada."

True or False?  The Validation tests are performed to provide reasonable assurance that a compiler is bug-free.

< prev   next >

Post a Comment