Ada and RealTime Systems - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Ada and RealTime Systems

Description:

Financial Systems Swiss Bank Electronic Funds Transfer ... Ceasing execution is not always safe. Ada: Has built in exception handling. Interrupt Handling ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 19
Provided by: robert837
Category:

less

Transcript and Presenter's Notes

Title: Ada and RealTime Systems


1
Ada and Real-Time Systems
2
What is Ada?
  • Modern programming language.
  • Initially developed by the US DOD.
  • Named after Ada Byron (1815-1852).
  • Initial standard released in 1983.
  • Updated in 1995.

3
Where is it Used?
  • Financial Systems Swiss Bank Electronic Funds
    Transfer
  • Air Traffic Control Systems Lockheed Martin ATM
  • Commercial Aviation Boeing 777
  • Scientific Space Vehicles QuickBird
  • Electric Rail Systems Paris Metro
  • Military Aircraft USAF B1- Bomber
  • and many other areas

4
Whats Needed?
  • Readability.
  • Flexibility.
  • Control.
  • Accuracy.
  • Determinable Execution.

5
General Readability
  • Should favour reader rather than writer
  • Ada
  • No length limit on identifiers.
  • No need to abbreviate.
  • Use of underscore as separator
  • Assists with human reading.

6
Safer Syntax
  • Common typing errors should not produce valid
    code.
  • Better if compiler can find problems early in
    development.

7
Safer Syntax (cont)
  • Example Fortran
  • The line
  • DO 20 I 1,100
  • When mistyped as
  • DO 20 I 1.100
  • Declares a new Real instead of a loop.
  • A mistake like this reputedly resulted in an
    American Viking Venus probe being lost!

8
Variable Declaration
  • Variables should be defined before use
  • Helps compiler enforce proper usage
  • Helps developers know where to look for
    definitions
  • Ada
  • Variables defined at the top of a code block.

9
Exception Handling
  • Exception handling allows application to handle
    unexpected situations.
  • Ceasing execution is not always safe.
  • Ada
  • Has built in exception handling.

10
Interrupt Handling
  • Real time systems need low-level access.
  • Frequently used to interface hardware.
  • Ada
  • Built in interrupt handling

11
Code Reuse
  • Code reuse encourages use of tested code.
  • Reduces development costs.
  • Encourages design of small units.
  • Ada
  • Supports packaging code.
  • Object-oriented development.

12
Dynamic Memory Allocation
  • Allows dynamic data structures.
  • Ada
  • Allows dynamically assigning more memory using
    new keyword.
  • Data must be free manually after use.
  • Override heap algorithms.

13
Thread Priorities
  • Wide range of thread priorities.
  • Dynamic changing of priorities.
  • Good synchronisation primitives.
  • Ada
  • Wide range of thread priorities
  • Dynamic changing of priorities.
  • POSIX style synchronisation primitives.
  • Optional restricted tasking model

14
Program Control Transfer
  • Transfer based on time.
  • Transfer based on asynchronous event.
  • Ada
  • Can do both

15
Timing Precision
  • High accuracy
  • Must be higher than the task requires.
  • Ada
  • Nanosecond precision
  • Monotonic Time

16
Weaknesses of Ada
  • Manual Memory Management
  • Cause memory leaks.
  • When memory freed no checking of whether variable
    is in scope.
  • Language defined in English Prose
  • Difficult to develop compilers.
  • Test suite helps to check conformance.

17
Weaknesses of Ada (Cont)
  • Verbosity of Language
  • By appealing to reader, hinders developer.
  • Negative Image
  • Compared to Java/C
  • Smaller developer community

18
Summary
  • Ada supports many modern programming language
    concepts.
  • Gives developers flexibility and control.
  • Assists developers produce reliable code.
  • Generally very suitable for Real-Time Systems.
Write a Comment
User Comments (0)
About PowerShow.com