Skip to content

Commit 34265b9

Browse files
authored
Merge pull request #1180 from gusthoff/content/ada_idioms/review/editorial/structure/20250131
Editorial change: renaming course to "Ada In Practice"
2 parents bc236c0 + 218de15 commit 34265b9

23 files changed

+79
-79
lines changed

content/courses/ada-idioms/chapters/abstract_data_machines.rst renamed to content/courses/ada-in-practice/chapters/abstract_data_machines.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _Ada_Idioms_Abstract_Data_Machines:
1+
.. _Ada_In_Practice_Abstract_Data_Machines:
22

33
Abstract Data Machines
44
======================
@@ -22,7 +22,7 @@ How can the software representing the abstraction best implement this
2222
requirement?
2323

2424
The Abstract Data Type (ADT) :ref:`Abstract Data Type
25-
<Ada_Idioms_Abstract_Data_Types>` idiom is the primary abstraction
25+
<Ada_In_Practice_Abstract_Data_Types>` idiom is the primary abstraction
2626
definition facility in Ada. Given an ADT that provides the required
2727
facility you could simply declare a single object of the type. But how
2828
could you ensure that some other client, perhaps in the future, doesn't
@@ -45,7 +45,7 @@ implementation only creates one such object, so multiple object
4545
declarations are precluded.
4646

4747
Singletons can be expressed easily in Ada
48-
:ref:`Controlling Object Initialization and Creation <Ada_Idioms_Controlling_Object_Initialization_And_Creation>`
48+
:ref:`Controlling Object Initialization and Creation <Ada_In_Practice_Controlling_Object_Initialization_And_Creation>`
4949
but there is an alternative in this specific situation.
5050

5151
This idiom entry describes the alternative, known as the Abstract Data
@@ -134,7 +134,7 @@ Consider the following ADM version of the package :ada:`Integer_Stacks`, now
134134
renamed to :ada:`Integer_Stack` for reasons we will discuss shortly. In this
135135
version we declare the state in the package body.
136136

137-
.. _Ada_Idioms_Abstract_Data_Machines_Code_Example:
137+
.. _Ada_In_Practice_Abstract_Data_Machines_Code_Example:
138138

139139
.. code-block:: ada
140140
@@ -242,7 +242,7 @@ declare the data in the package body.
242242
The ADM idiom applies information hiding to the internal state, like the
243243
ADT idiom, except that the state is not in an object declared by the
244244
client. Also, like the :ref:`Groups of Related Program Units
245-
<Ada_Idioms_Groups_Of_Related_Program_Units>`, the implementations of
245+
<Ada_In_Practice_Groups_Of_Related_Program_Units>`, the implementations of
246246
the visible subprograms are hidden in the package body, along with any
247247
non-visible entities required for their implementation.
248248

content/courses/ada-idioms/chapters/abstract_data_types.rst renamed to content/courses/ada-in-practice/chapters/abstract_data_types.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _Ada_Idioms_Abstract_Data_Types:
1+
.. _Ada_In_Practice_Abstract_Data_Types:
22

33
Abstract Data Types
44
===================
@@ -9,7 +9,7 @@ Motivation
99
----------
1010

1111
In the
12-
:ref:`Groups of Related Program Units <Ada_Idioms_Groups_Of_Related_Program_Units>` idiom,
12+
:ref:`Groups of Related Program Units <Ada_In_Practice_Groups_Of_Related_Program_Units>` idiom,
1313
client compile-time visibility to the type's representation is both an
1414
advantage and a disadvantage. Visibility to the representation makes available
1515
the expressiveness of low-level syntax, such as array indexing and aggregates,
@@ -26,7 +26,7 @@ bound. The likely representation for the :ada:`Stack` type will require both
2626
an array for the contained values and a *stack pointer* indicating the *top* of
2727
the stack. Hence this will be a composite type, probably a record type. If we
2828
use the
29-
:ref:`Groups of Related Program Units <Ada_Idioms_Groups_Of_Related_Program_Units>`
29+
:ref:`Groups of Related Program Units <Ada_In_Practice_Groups_Of_Related_Program_Units>`
3030
idiom the code might look like this:
3131

3232
.. code-block:: ada
@@ -166,7 +166,7 @@ internal representation.
166166
Consider the following revision to the package :ada:`Integer_Stacks`, now as
167167
an ADT:
168168

169-
.. _Ada_Idioms_Abstract_Data_Types_Code_Example:
169+
.. _Ada_In_Practice_Abstract_Data_Types_Code_Example:
170170

171171
.. code-block:: ada
172172
@@ -225,7 +225,7 @@ former case. When it is strictly an implementation artifact, as in this
225225
case, it should be in the private part so that it's hidden from clients.
226226

227227
The ADT idiom extends the information hiding applied by the
228-
:ref:`Groups of Related Program Units <Ada_Idioms_Groups_Of_Related_Program_Units>`
228+
:ref:`Groups of Related Program Units <Ada_In_Practice_Groups_Of_Related_Program_Units>`
229229
idiom to include the type's representation.
230230

231231
The compile-time lack of visibility to the representation means that clients no
@@ -353,7 +353,7 @@ Cons
353353

354354
There is more source code text required in an ADT package compared to the idiom
355355
in which the representation is not hidden (the
356-
:ref:`Groups of Related Program Units <Ada_Idioms_Groups_Of_Related_Program_Units>`).
356+
:ref:`Groups of Related Program Units <Ada_In_Practice_Groups_Of_Related_Program_Units>`).
357357
The bulk of the additional text is due to the functions and procedures
358358
required to provide the capabilities that the low-level representation-based
359359
syntax might have provided, i.e., the *constructor* and *selector/accessor*
@@ -366,10 +366,10 @@ Relationship With Other Idioms
366366
------------------------------
367367

368368
The package-oriented idioms described here and
369-
:ref:`previously <Ada_Idioms_Essential_Design_Idioms_For_Packages>`
369+
:ref:`previously <Ada_In_Practice_Essential_Design_Idioms_For_Packages>`
370370
are the foundational program composition idioms because packages are the
371371
primary structuring unit in Ada. That is especially true of the
372-
:ref:`Abstract Data Type <Ada_Idioms_Abstract_Data_Types>` idiom, which is the
372+
:ref:`Abstract Data Type <Ada_In_Practice_Abstract_Data_Types>` idiom, which is the
373373
primary type specification facility in Ada. We will
374374
describe additional package-oriented idioms,
375375
especially regarding hierarchical packages, but those kinds
File renamed without changes.

content/courses/ada-idioms/chapters/component_access_to_rec_objs.rst renamed to content/courses/ada-in-practice/chapters/component_access_to_rec_objs.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _Ada_Idioms_Component_Access_To_Enclosing_Record_Objects:
1+
.. _Ada_In_Practice_Component_Access_To_Enclosing_Record_Objects:
22

33
Providing Component Access to Enclosing Record Objects
44
======================================================
@@ -67,7 +67,7 @@ entities being represented in software. Representing these entities as multiple
6767
objects declared of a single type is by far the most reasonable approach.
6868

6969
We assume the functional unit will be implemented as an
70-
:ref:`Abstract Data Type (ADT) <Ada_Idioms_Abstract_Data_Types>`. Strictly
70+
:ref:`Abstract Data Type (ADT) <Ada_In_Practice_Abstract_Data_Types>`. Strictly
7171
speaking, the ADT idiom is not required here, but that is the best approach for
7272
defining major types, for the good reasons given in that idiom entry. There's
7373
no reason not to use an ADT in this case so we will.
@@ -307,7 +307,7 @@ designs.
307307

308308
Here's the resulting package declaration for the serial IO device ADT. Parts of
309309
the package are elided for simplicity (the full code is
310-
:ref:`at the end of this idiom entry <Ada_Idioms_Serial_IO_Complete_Example>`):
310+
:ref:`at the end of this idiom entry <Ada_In_Practice_Serial_IO_Complete_Example>`):
311311

312312
.. code-block:: ada
313313
@@ -395,7 +395,7 @@ Here is the client view of the ADT for the interrupt-driven implementation:
395395
end Serial_IO.Interrupt_Driven;
396396
397397
The declaration of type :ada:`Serial_Port` uses
398-
:ref:`Interface Inheritance <Ada_Idioms_Inheritance_Idioms>` to extend
398+
:ref:`Interface Inheritance <Ada_In_Practice_Inheritance_Idioms>` to extend
399399
:ada:`Serial_IO.Device` with both visible and hidden components. The three
400400
visible extension components are the discriminants :ada:`Transceiver`,
401401
:ada:`IRQ`, and :ada:`IRQ_Priority`. :ada:`Transceiver` will designate the
@@ -552,11 +552,11 @@ Relationship With Other Idioms
552552
-------------------------------
553553

554554
This idiom is useful when we have a record type enclosing a PO or task object.
555-
If the :ref:`Abstract Data Machine (ADM) <Ada_Idioms_Abstract_Data_Machines>`
555+
If the :ref:`Abstract Data Machine (ADM) <Ada_In_Practice_Abstract_Data_Machines>`
556556
would instead be appropriate, the necessary visibility can be achieved without
557557
requiring this implementation approach because there would be no enclosing record type.
558558
But as described in the ADM discussion, the
559-
:ref:`ADT approach <Ada_Idioms_Abstract_Data_Types>` is usually superior.
559+
:ref:`ADT approach <Ada_In_Practice_Abstract_Data_Types>` is usually superior.
560560

561561

562562
Notes
@@ -570,7 +570,7 @@ record component types. We could use the Hardware Abstraction Layer
570570
affect the idiom expression itself.
571571

572572

573-
.. _Ada_Idioms_Serial_IO_Complete_Example:
573+
.. _Ada_In_Practice_Serial_IO_Complete_Example:
574574

575575

576576
Full Source Code for Selected Units

content/courses/ada-idioms/chapters/constructor_functions_for_abstract_data_types.rst renamed to content/courses/ada-in-practice/chapters/constructor_functions_for_abstract_data_types.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _Ada_Idioms_Constructor_Functions_For_Abstract_Data_Types:
1+
.. _Ada_In_Practice_Constructor_Functions_For_Abstract_Data_Types:
22

33
Constructor Functions For Abstract Data Types
44
=============================================
@@ -25,7 +25,7 @@ existing parent type.
2525

2626
This discussion assumes these tagged types are declared in packages designed
2727
using the
28-
:ref:`Abstract Data Type <Ada_Idioms_Abstract_Data_Types>` (ADT) idiom.
28+
:ref:`Abstract Data Type <Ada_In_Practice_Abstract_Data_Types>` (ADT) idiom.
2929
We strongly recommend the reader be comfortable with that idiom before
3030
proceeding.
3131

@@ -98,7 +98,7 @@ their inheritance.
9898
The explanation and illustration for these rules first requires explanation of
9999
the word *abstract*. We mentioned above that the package enclosing the
100100
type will be designed with the
101-
:ref:`Abstract Data Type <Ada_Idioms_Abstract_Data_Types>` idiom. In that idiom
101+
:ref:`Abstract Data Type <Ada_In_Practice_Abstract_Data_Types>` idiom. In that idiom
102102
*abstract* means that the type represents an abstraction. (See that section for
103103
the details.)
104104

content/courses/ada-idioms/chapters/controlling_obj_initialization_creation.rst renamed to content/courses/ada-in-practice/chapters/controlling_obj_initialization_creation.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _Ada_Idioms_Controlling_Object_Initialization_And_Creation:
1+
.. _Ada_In_Practice_Controlling_Object_Initialization_And_Creation:
22

33
Controlling Object Initialization and Creation
44
==============================================
@@ -145,7 +145,7 @@ up to :ada:`Top`.
145145
And of course, the initial value might require client-specific information.
146146

147147
Calling a
148-
:ref:`constructor function <Ada_Idioms_Constructor_Functions_For_Abstract_Data_Types>`
148+
:ref:`constructor function <Ada_In_Practice_Constructor_Functions_For_Abstract_Data_Types>`
149149
for the initial value would be the right approach in these cases, returning an
150150
object of the type. The function might even take an existing object as a
151151
parameter, creating a new object with only the necessary parts copied.
@@ -163,7 +163,7 @@ Preventing object creation is not typical but is not unknown. The
163163
is an example, in which a type is defined but corresponding object creation by
164164
clients is not intended. Instead, the abstraction implementation creates a
165165
single object of the type. The abstraction is a type, rather than an
166-
:ref:`ADM <Ada_Idioms_Abstract_Data_Machines>`, for the sake of potential
166+
:ref:`ADM <Ada_In_Practice_Abstract_Data_Machines>`, for the sake of potential
167167
extension via inheritance. We will illustrate this design pattern and implementation
168168
using a real-world hardware device.
169169

@@ -185,7 +185,7 @@ are initialized before read.)
185185

186186
Add link to SPARK ref for data initialization
187187

188-
The :ref:`ADT idiom <Ada_Idioms_Abstract_Data_Types>` describes Ada *building
188+
The :ref:`ADT idiom <Ada_In_Practice_Abstract_Data_Types>` describes Ada *building
189189
blocks* that developers can use to compose types with semantics that we
190190
require. We can declare a type to be private, for example, so that the
191191
implementation is not compile-time visible to clients.
@@ -196,7 +196,7 @@ things) for client objects of the type. We can combine the two building blocks,
196196
creating a type that is both private and limited.
197197

198198
Throughout this discussion we will assume that these designs are based on
199-
:ref:`Abstract Data Types <Ada_Idioms_Abstract_Data_Types>`, hence we assume
199+
:ref:`Abstract Data Types <Ada_In_Practice_Abstract_Data_Types>`, hence we assume
200200
the use of private types. That's a general, initial design assumption but in
201201
this case private types are required by the two idiom implementations. The types are
202202
not necessarily limited as well, but in one situation they will be limited too.
@@ -287,7 +287,7 @@ private.
287287

288288
Unknown discriminants can be specified for various kinds of types, not only
289289
private types. See the
290-
:ref:`Notes section <Ada_Idioms_Controlling_Object_Initialization_And_Creation_Notes>`
290+
:ref:`Notes section <Ada_In_Practice_Controlling_Object_Initialization_And_Creation_Notes>`
291291
for the full list. That said, combining them with private type declarations, or
292292
private type extension declarations, is the most common usage when composing
293293
abstraction definitions. For example:
@@ -509,7 +509,7 @@ value. The compiler will not compile the code containing the declaration
509509
otherwise. The only constructor function provided is
510510
:ada:`Configured_Controller` so it is guaranteed to be called. (A later child
511511
package could add another
512-
:ref:`constructor function <Ada_Idioms_Constructor_Functions_For_Abstract_Data_Types>`.
512+
:ref:`constructor function <Ada_In_Practice_Constructor_Functions_For_Abstract_Data_Types>`.
513513
For that matter, we probably should have declared this one in a child package.
514514
In any case one of them is guaranteed to be called.)
515515

@@ -967,7 +967,7 @@ class-wide type so that extensions could use it to allocate objects of their
967967
specific type, otherwise extensions in child packages would have no need for
968968
it. But that only saves the storage for an access object in the child packages,
969969
so we leave the declaration in the parent package body. See the
970-
:ref:`Programming by Extension idiom <Ada_Idioms_Programming_By_Extension>`
970+
:ref:`Programming by Extension idiom <Ada_In_Practice_Programming_By_Extension>`
971971
for a discussion of whether to declare an entity in the package private part or
972972
the package body.
973973

@@ -1239,11 +1239,11 @@ None.
12391239
Relationship With Other Idioms
12401240
------------------------------
12411241

1242-
The :ref:`Abstract Data Type <Ada_Idioms_Abstract_Data_Types>` is assumed, in
1242+
The :ref:`Abstract Data Type <Ada_In_Practice_Abstract_Data_Types>` is assumed, in
12431243
the form of a private type.
12441244

12451245

1246-
.. _Ada_Idioms_Controlling_Object_Initialization_And_Creation_Notes:
1246+
.. _Ada_In_Practice_Controlling_Object_Initialization_And_Creation_Notes:
12471247

12481248
Notes
12491249
----------------------------------------------------------

content/courses/ada-idioms/chapters/essential_idioms_for_packages.rst renamed to content/courses/ada-in-practice/chapters/essential_idioms_for_packages.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. _Ada_Idioms_Essential_Design_Idioms_For_Packages:
1+
.. _Ada_In_Practice_Essential_Design_Idioms_For_Packages:
22

33
Essential Design Idioms for Packages
44
====================================
@@ -57,7 +57,7 @@ package declarations will contain. But as you will see, what they can
5757
contain is a reflection of the degree of information hiding involved.
5858

5959

60-
.. _Ada_Idioms_Named_Collection_Of_Declarations:
60+
.. _Ada_In_Practice_Named_Collection_Of_Declarations:
6161

6262
Named Collection of Declarations
6363
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -116,7 +116,7 @@ idiom provides the way to declare it. Note also that global *constants*
116116
are less problematic than variables because they can't be changed.
117117

118118

119-
.. _Ada_Idioms_Groups_Of_Related_Program_Units:
119+
.. _Ada_In_Practice_Groups_Of_Related_Program_Units:
120120

121121
Groups of Related Program Units
122122
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -151,7 +151,7 @@ For example:
151151
In this example, :ada:`Vector` and :ada:`Matrix` are the types under
152152
consideration. The type :ada:`Real` might be declared here too, but it might be
153153
better declared in a
154-
:ref:`Named Collection of Declarations <Ada_Idioms_Named_Collection_Of_Declarations>`
154+
:ref:`Named Collection of Declarations <Ada_In_Practice_Named_Collection_Of_Declarations>`
155155
package referenced in a with_clause. In any case, this package declares types
156156
and subprograms that manipulate values of those types.
157157

content/courses/ada-idioms/chapters/images/audio_device_architecture.png renamed to content/courses/ada-in-practice/chapters/images/audio_device_architecture.png

File renamed without changes.

content/courses/ada-idioms/chapters/images/task_release_using_entry_barrier.png renamed to content/courses/ada-in-practice/chapters/images/task_release_using_entry_barrier.png

File renamed without changes.

content/courses/ada-idioms/chapters/images/task_release_using_suspension_object.png renamed to content/courses/ada-in-practice/chapters/images/task_release_using_suspension_object.png

File renamed without changes.

0 commit comments

Comments
 (0)