It has these four root packages:. Besides the Standard Library, compilers usually come with a built-in library. This chapter describes the GNAT library in particular. This section is a reference of third-party Ada libraries which are not part of the compiler predefined environment but are freely available. This book has a collection for ordering a printed copy of this book for a fee. A printable version of Ada Programming is available.
The following are collection pages. All collection pages are comprised of groups of the already available pages. You can use them for printing or to gain a quick overview. Please note that those pages are partly very long. The Source from the Book is available for download and online browsing. The latter allows "drill down", meaning that you can follow the links right down to the package bodies in the Ada runtime library. If you wish to contribute as well you should read Contributing and join us at the Contributors lounge.
Ada Programming. Ada Programming is a featured book on Wikibooks because it contains substantial content, it is well-formatted, and the Wikibooks community has decided to feature it on the main page or in other places. Please continue to improve it and thanks for the great work so far! You can edit its advertisement template. ISBN Retrieved Protected objects combine the data encapsulation and safe mutual exclusion from monitors, and entry guards from conditional critical regions.
The main advantage over classical monitors is that conditional variables are not required for signaling, avoiding potential deadlocks due to incorrect locking semantics.
Like tasks, the protected object is a built-in limited type, and it also has a declaration part and a body. A protected object consists of encapsulated private data which can only be accessed from within the protected object , and procedures, functions and entries which are guaranteed to be mutually exclusive with the only exception of functions, which are required to be side effect free and can therefore run concurrently with other functions. A task calling a protected object is blocked if another task is currently executing inside the same protected object, and released when this other task leaves the protected object.
Blocked tasks are queued on the protected object ordered by time of arrival. Protected object entries are similar to procedures, but additionally have guards. If a guard evaluates to false, a calling task is blocked and added to the queue of that entry; now another task can be admitted to the protected object, as no task is currently executing inside the protected object. Guards are re-evaluated whenever a task leaves the protected object, as this is the only time when the evaluation of guards can have changed.
Calls to entries can be requeued to other entries with the same signature. A task that is requeued is blocked and added to the queue of the target entry; this means that the protected object is released and allows admission of another task. The select statement in Ada can be used to implement non-blocking entry calls and accepts, non-deterministic selection of entries also with guards , time-outs and aborts.
The following example illustrates some concepts of concurrent programming in Ada. A pragma is a compiler directive that conveys information to the compiler to allow specific manipulating of compiled output.
These documents have been published in various forms, including print. Copyright The image is from Wikipedia Commons. Wikipedia Page. Ada Resource Association. Retrieved Ada Conformity Assessment Authority. Archived from the original on Cray Inc. International Organization for Standardization. University of Mich. Retrieved 27 May S2CID Retrieved November 5, Tucker; Olsen, Florence Government Computer News.
Communications of the ACM. Association for Computing Machinery. Ada: Language and Methodology. November August Ada Letters. Waltham, MA. ISBN Ada Information Clearinghouse. July 1, In Stellman, Andrew; Greene, Jennifer eds. Sebastopol, California: O'Reilly. ACM Queue. Archived from the original PDF on 6 July Retrieved 28 February Booch, Grady Software Engineering with Ada.
Skansholm, Jan Ada 95 From the Beginning. Gilpin, Geoff Ada: A Guided Tour and Tutorial. Prentice hall. Barnes, John Programming in Ada Programming in Ada plus Language Reference Manual. Beidler, John Gonzalez, Dean W. Ada Programmer's Handbook. Benjamin-Cummings Publishing Company. Ben-Ari, M. Ada for Software Engineers. Cohen, Norman Ada as a Second Language. Burns, Alan ; Wellings, Andy Real-Time Systems and Programming Languages.
Concurrency in Ada. Cambridge University Press. ISBN X. The concept of attributes is pretty unique to Ada. Attributes allow you to get —and sometimes set— information about objects or other language entities such as types.
A good example is the Size attribute. It describes the size of an object or a type in bits.
0コメント