@@ -8,286 +8,100 @@ Language Structure (Ada95 and Onward)
8
8
9
9
* **Required ** :dfn: `Core ` implementation
10
10
11
- - Reference Manual (RM) sections 1 :math: `\rightarrow ` 13
12
- - Predefined Language Environment (Annex A)
13
- - Interface to Other Languages (Annex B)
14
- - Obsolescent Features (Annex J)
11
+ * Always present in each compiler/run-time
15
12
16
- * Optional :dfn: `Specialized Needs Annexes `
17
-
18
- - No additional syntax
19
- - Systems Programming (C)
20
- - Real-Time Systems (D)
21
- - Distributed Systems (E)
22
- - Information Systems (F)
23
- - Numerics (G)
24
- - High-Integrity Systems (H)
25
-
26
- -------------------------
27
- *Core * Language Content
28
- -------------------------
29
-
30
- * Ada is a **compiled **, **multi-paradigm ** language
31
- * With a **static ** and **strong ** type model
32
-
33
- .. container :: columns
34
-
35
- .. container :: column
36
-
37
- * Language-defined types, including string
38
- * User-defined types
39
- * Overloading procedures and functions
40
- * Compile-time visibility control
41
- * Abstract Data Types (ADT)
42
-
43
- .. container :: column
44
-
45
- * Exceptions
46
- * Generic units
47
- * Dynamic memory management
48
- * Low-level programming
49
- * Object-Oriented Programming (OOP)
50
- * Concurrent programming
51
- * Contract-Based Programming
52
-
53
- --------------------------
54
- The Type Model Saves Money
55
- --------------------------
56
-
57
- * Shifts fixes and costs to **early phases **
58
-
59
-
60
- * Cost of an error *during a flight *?
61
-
62
- .. image :: relative_cost_to_fix_bugs.jpg
63
- :height: 50%
64
-
65
- -------------
66
- Subprograms
67
- -------------
68
-
69
- - Syntax differs between *values * and *actions *
70
- - :ada: `function ` for a *value *
71
-
72
- .. code :: Ada
73
-
74
- function Is_Leaf (T : Tree) return Boolean
75
-
76
- - :ada: `procedure ` for an *action *
77
-
78
- .. code :: Ada
79
-
80
- procedure Split (T : in out Tree;
81
- Left : out Tree;
82
- Right : out Tree)
83
-
84
- * Specification :math: `\neq ` Implementation
85
-
86
- .. code :: Ada
87
-
88
- function Is_Leaf (T : Tree) return Boolean;
89
- function Is_Leaf (T : Tree) return Boolean is
90
- begin
91
- ...
92
- end Is_Leaf;
93
-
94
- ---------------------------
95
- Dynamic Memory Management
96
- ---------------------------
97
-
98
- * Raw pointers are error-prone
99
- * Ada **access types ** abstract facility
100
-
101
- - Static memory
102
- - Allocated objects
103
- - Subprograms
104
-
105
- * Accesses are **checked **
106
-
107
- - Unless unchecked mode is used
108
-
109
- * Supports user-defined storage managers
110
-
111
- - Storage **pools **
112
-
113
- ----------
114
- Packages
115
- ----------
116
-
117
- * Grouping of related entities
118
-
119
- - Subsystems like *Fire Control * and *Navigation *
120
- - Common processing like *HMI * and *Operating System *
13
+ - Basic language contents (types, subprograms, packages, etc.)
14
+ - Interface to Other Languages
121
15
122
- * Separation of concerns
123
-
124
- - Specification :math: `\neq ` Implementation
125
- - Single definition by **designer **
126
- - Multiple use by **users **
127
-
128
- * Information hiding
129
-
130
- - Compiler-enforced **visibility **
131
- - Powerful **privacy ** system
132
-
133
- ------------
134
- Exceptions
135
- ------------
136
-
137
- * Dealing with **errors **, **unexpected ** events
138
- * Separate error-handling code from logic
139
- * Some flexibility
140
-
141
- - Re-raising
142
- - Custom messages
143
-
144
- ---------------
145
- Generic Units
146
- ---------------
147
-
148
- .. container :: columns
149
-
150
- .. container :: column
151
-
152
- * Code Templates
153
-
154
- - Subprograms
155
- - Packages
156
-
157
- * Parameterization
158
-
159
- - Strongly typed
160
- - **Expressive ** syntax
16
+ * Optional :dfn: `Specialized Needs Annexes `
161
17
162
- .. container :: column
18
+ * No additional syntax
19
+ * May be present or not depending on compiler/run-time
163
20
164
- .. image :: generic_template_to_instances.png
21
+ - Real-Time Systems
22
+ - Distributed Systems
23
+ - Numerics
24
+ - High-Integrity Systems
165
25
166
26
-----------------------------
167
- Object-Oriented Programming
27
+ Core Language Content (1/3)
168
28
-----------------------------
169
29
170
- * Inheritance
171
- * Run-time polymorphism
172
- * Dynamic **dispatching **
173
- * Abstract types and subprograms
174
- * **Interface ** for multiple inheritance
175
-
176
- ----------------------------
177
- Contract-Based Programming
178
- ----------------------------
179
-
180
- * Pre- and post-conditions
181
- * Formalizes specifications
30
+ * Types
182
31
183
- .. code :: Ada
32
+ * Language-defined types, including string
33
+ * User-defined types
34
+ * Static types keep things consistent
35
+ * Strong types enforce constraints
184
36
185
- procedure Pop (S : in out Stack) with
186
- Pre => not S.Empty, -- Requirement
187
- Post => not S.Full; -- Guarantee
37
+ * Subprograms
188
38
189
- * Type invariants
39
+ * Syntax differs between *values * and *actions *
40
+ * :ada: `function ` for *value * and :ada: `procedure ` for *action *
41
+ * Overloading of names allowed
190
42
191
- .. code :: Ada
43
+ * Dynamic memory management
192
44
193
- type Table is private with Invariant => Sorted (Table); -- Guarantee
45
+ * :dfn: `access type ` for abstraction of pointers
46
+ * Access to static memory, allocated objects, subprograms
47
+ * Accesses are **checked ** (unless otherwise requested)
194
48
195
- --------------------------
196
- Language-Based Concurrency
197
- --------------------------
49
+ * Packages
198
50
199
- * **Expressive **
51
+ * Grouping of related entities
52
+ * Separation of concerns
53
+ * Information hiding
200
54
201
- - Close to problem-space
202
- - Specialized constructs
203
- - **Explicit ** interactions
204
-
205
- * **Run-time ** handling
206
-
207
- - Maps to OS primitives
208
- - Several support levels (Ravenscar...)
209
-
210
- * **Portable **
211
-
212
- - Source code
213
- - People
214
- - OS & Vendors
215
-
216
- -----------------------
217
- Low Level Programming
218
- -----------------------
219
-
220
- * **Representation ** clauses
221
- * Bit-level layouts
222
- * Storage pools definition
223
-
224
- - With access safeties
225
-
226
- * Foreign language integration
227
-
228
- - C
229
- - C++
230
- - Assembly
231
- - etc...
55
+ -----------------------------
56
+ Core Language Content (2/3)
57
+ -----------------------------
232
58
233
- * Explicit specifications
59
+ * Exceptions
234
60
235
- - Expressive
236
- - Efficient
237
- - Reasonably portable
238
- - Abstractions preserved
61
+ * Dealing with **errors **, **unexpected ** events
62
+ * Separate error-handling code from logic
239
63
240
- ---------------------------------
241
- Standard Language Environment
242
- ---------------------------------
64
+ * Generic Units
243
65
244
- Standardized common API
66
+ * Code templates
67
+ * Extensive parameterization for customization
245
68
246
- .. container :: columns
69
+ * Object-Oriented Programming
247
70
248
- .. container :: column
71
+ * Inheritance
72
+ * Run-time polymorphism
73
+ * Dynamic **dispatching **
249
74
250
- * Types
75
+ * Contract-Based Programming
251
76
252
- - Integer
253
- - Floating-point
254
- - Fixed-point
255
- - Boolean
256
- - Characters, Strings, Unicode
257
- - etc...
77
+ * Pre- and post-conditions on subprograms
258
78
259
- * Math
79
+ * Formalizes specifications
260
80
261
- - Trigonometric
262
- - Complexes
81
+ * Type invariants and predicates
263
82
264
- * Pseudo-random number generators
83
+ * Complex contracts on type definitions
265
84
266
- .. container :: column
267
-
268
- * I/O
269
-
270
- - Text
271
- - Binary (direct / sequential)
272
- - Files
273
- - Streams
85
+ -----------------------------
86
+ Core Language Content (3/3)
87
+ -----------------------------
274
88
275
- * Exceptions
89
+ * Language-Based Concurrency
276
90
277
- - Call-stack
91
+ * Explicit interactions
92
+ * Run-time handling
93
+ * Portable
278
94
279
- * **Command-line ** arguments
280
- * **Environment ** variables
281
- * **Containers **
95
+ * Low Level Programming
282
96
283
- - Vector
284
- - Map
97
+ * Define representation of types
98
+ * Storage pools definition
99
+ * Foreign language integration
285
100
286
101
------------------------------
287
102
Language Examination Summary
288
103
------------------------------
289
104
290
- * Unique capabilities
291
105
* Three main goals
292
106
293
107
- **Reliability **, maintainability
0 commit comments