Presentation is loading. Please wait.

Presentation is loading. Please wait.

Design Goals Programs reliability and maintenance is important

Similar presentations


Presentation on theme: "Design Goals Programs reliability and maintenance is important"— Presentation transcript:

1 Design Goals Programs reliability and maintenance is important
Military software systems are expected to have a minimum lifetime of 30 years Programming is a human activity Efficiency "Hence emphasis was placed on program readability over ease of writing" Ada is a computer programming language originally designed to support the construction of long-lived, highly reliable software systems. Its design emphasizes readability, avoids error-prone notation, encourages reuse and team coordination, and it is designed to be efficiently implementable. A significant advantage of Ada is its reduction of debugging time. Ada tries to catch as many errors as reasonably possible, as early as possible. Many errors are caught at compile-time by Ada that aren't caught or are caught much later by other computer languages. Ada programs also catch many errors at run-time if they can't be caught at compile-time (this checking can be turned off to improve performance if desired). In addition, Ada includes a problem (exception) handling mechanism so that these problems can be dealt with at run-time.

2 Ada History The need for a single standard language – 1975
Requirements document developed; strawman Refined to Woodman and then Tinman – 1976 Further refined to ironman Proposals were invited for the design of a new language Four selected (green, red, blue, and yellow) Initial designs were submitted in 1978 red and green proposals were short listed Standard refined to steelman The designs were refined further and finally ‘green’ was selected in 1979 Where and how is Ada standardized? Ada was originally standardized by ANSI in 1983 (ISO released an equivalent standard in 1987). Ada was recently revised to add some new capabilities; this revision is called `Ada 9X' or `Ada 95'. Ada compiler vendors have generally updated their compilers to add the new Ada 95 features. This tutorial covers the capabilities of Ada 95, but will note which features are new to Ada Ada is officially defined in its reference manual (RM). The complete Ada 95 RM is available on-line as a hypertext document. However, the RM is not intended to be a tutorial and can be hard to understand if you're not already somewhat familiar with Ada. We will often refer to the RM, and feel free to look at it if you're interested in more detail about a particular subject. Ada was not designed by a committee. The original Ada design was the winner of a language design competition; the winning team was headed by Jean Ichbiah (Ichbiah's language was called "Green"). The 1995 revision of Ada (Ada 95) was developed by a small team led by Tucker Taft. In both cases, the design underwent a public comment period where the designers responded to public comments.

3 Ada History DoD announced that the language will be called Ada.
The 1995 revision of Ada (Ada 95) was developed by a small team led by Tucker Taft. In both cases, the design underwent a public comment period where the designers responded to public comments and finally the language was finalized Where and how is Ada standardized? Ada was originally standardized by ANSI in 1983 (ISO released an equivalent standard in 1987). Ada was recently revised to add some new capabilities; this revision is called `Ada 9X' or `Ada 95'. Ada compiler vendors have generally updated their compilers to add the new Ada 95 features. This tutorial covers the capabilities of Ada 95, but will note which features are new to Ada Ada is officially defined in its reference manual (RM). The complete Ada 95 RM is available on-line as a hypertext document. However, the RM is not intended to be a tutorial and can be hard to understand if you're not already somewhat familiar with Ada. We will often refer to the RM, and feel free to look at it if you're interested in more detail about a particular subject. Ada was not designed by a committee. The original Ada design was the winner of a language design competition; the winning team was headed by Jean Ichbiah (Ichbiah's language was called "Green"). The 1995 revision of Ada (Ada 95) was developed by a small team led by Tucker Taft. In both cases, the design underwent a public comment period where the designers responded to public comments.

4 Ada Features Packages (modules) of related types, objects, and operations can be defined Packages and types can be made generic (parameterized templates) to help create reusable components It is strongly typed Errors can be signaled as exceptions and handled explicitly. Many serious errors (such as computational overflow and invalid array indexes) are automatically caught and handled through this exception handling mechanism, thus improving program reliability

5 Ada Features Tasks Multiple parallel threads of control that can be used to create and communicate different threads of control. This is a major capability not supported in a standard way by many other languages

6 Ada Features A predefined library is included; it provides input/output (I/O), string manipulation, numeric functions, a command line interface, and a random number generator (the last two were available in Ada 83, but are standardized in Ada 95) Object-oriented programming is supported (this is a new feature of Ada 95). In fact, Ada 95 is the first internationally standardized object-oriented programming language Interfaces to other languages (such as C, Fortran, and COBOL) are included in the language

7 Ada “Hello World” not case sensitive
with Ada.Text_Io; -- intent to use -- kind of include use Ada.Text_Io; -- direct visibility procedure Hello is -- procedure without -- parameters is the -- starting point begin Put_Line("Hello World!"); end Hello; not case sensitive

8 Ada Operators Operator C/C++ Ada Assignment = := Equality ==
Non Equality != /= Greater Than > Less Than < Greater Than Or Equal >= Less Than Or Equal <=

9 Ada Operators Operator C/C++ Ada PlusEquals += SubtractEquals -=
SubtractEquals -= MultiplyEquals *= DivisionEquals /= OrEquals |= AndEquals &=

10 Ada Operators Operator C/C++ Ada Modulus % mod Remainder rem
rem AbsoluteValue abs Exponentiation ** Range ..

11 Ada Operators Operator C/C++ Ada Membership in Logical And && and
in Logical And && and Logical Or || or Logical Not ! not Bitwise And & Bitwise Or | Bitwise Exclusive Or ^ xor Bitwise Not ~ String Concatenation

12 Operator Overloading Ada allows a limited overloading of operators
The exception in Ada is that the assignment operator ( := ) cannot be overridden can be overridden in case of inheritance from a special kind of “abstract class” When you override the equality operator ( = ) you also implicitly override the inequality operator ( /= )

13 Ada Types Ada provides a large number of kinds of data types
Ada does not have a predefined inheritance hierarchy like many object oriented programming languages Ada allows you to define your own data types, including numeric data types Defining your own type in Ada creates a new type


Download ppt "Design Goals Programs reliability and maintenance is important"

Similar presentations


Ads by Google