Book contents
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 The nature and uses of concurrent programming
- 3 Inter-process communication
- 4 Task types and objects
- 5 The rendezvous
- 6 The select statement and the rendezvous
- 7 Protected objects and data-oriented communication
- 8 Avoidance synchronisation and the requeue facility
- 9 Exceptions, abort and asynchronous transfer of control
- 10 Object-oriented programming and tasking
- 11 Concurrency utilities
- 12 Tasking and systems programming
- 13 Scheduling real-time systems – fixed priority dispatching
- 14 Scheduling real-time systems – other dispatching facilities
- 15 Timing events and execution-time control
- 16 Real-time utilities
- 17 Restrictions, metrics and the Ravenscar profile
- 18 Conclusion
- References
- Index
10 - Object-oriented programming and tasking
Published online by Cambridge University Press: 10 December 2009
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 The nature and uses of concurrent programming
- 3 Inter-process communication
- 4 Task types and objects
- 5 The rendezvous
- 6 The select statement and the rendezvous
- 7 Protected objects and data-oriented communication
- 8 Avoidance synchronisation and the requeue facility
- 9 Exceptions, abort and asynchronous transfer of control
- 10 Object-oriented programming and tasking
- 11 Concurrency utilities
- 12 Tasking and systems programming
- 13 Scheduling real-time systems – fixed priority dispatching
- 14 Scheduling real-time systems – other dispatching facilities
- 15 Timing events and execution-time control
- 16 Real-time utilities
- 17 Restrictions, metrics and the Ravenscar profile
- 18 Conclusion
- References
- Index
Summary
The Ada language addresses many aspects of software engineering, but it is beyond the scope of this book to discuss in detail its support for such topics as programming in the large, reuse and so on. Rather, the goal of this book is to discuss, in depth, the Ada model of concurrency and how it is affected by other areas of the language, for example exception handling. This chapter explores the interaction between the object-oriented programming (OOP) facilities and tasking.
Ada 83 was defined long before object-oriented programming became popular, and it is a credit to the Ada 95 language designers that they managed to introduce OOP facilities without having to alter the basic structure of an Ada program. However, the Ada 95 model had several limitations. In particular, it did not support the standard prefix notation (also called the distinguised receiver syntax), Object_Name.Method_Name(Params), found in most OOP languages. Instead, it required the object name to be given as part of the parameter list of the method. Although this had some advantages, it caused some confusion when programmers moved from languages like C++ and Java to Ada. Ada 2005 now allows the standard OOP notation with the object name prefixing the subprogram name when it is called.
Ada 95 also didn't attempt to integrate the language's support for concurrent programming directly into the OOP model. Instead, the models were orthogonal and paradigms had to be created to allow the benefits of OOP to be available in a concurrent environment.
- Type
- Chapter
- Information
- Concurrent and Real-Time Programming in Ada , pp. 223 - 246Publisher: Cambridge University PressPrint publication year: 2007