Skip to content

Commit b68378d

Browse files
Merge branch 'slides/123-refine-the-overview-intro-module-by-removing-recap-slides' into 'master'
Resolve "Refine the Overview/Intro Module by Removing Recap Slides" Closes #123 See merge request feng/training/material!265
2 parents c461d37 + 968c1a5 commit b68378d

File tree

3 files changed

+69
-243
lines changed

3 files changed

+69
-243
lines changed

courses/fundamentals_of_ada/010_overview/01-a_little_history.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,5 @@ Ada Evolution Highlights
6363
| :ada:`'Image` for all types
6464
| Declare expression
6565
66+
.. note:: Ada was created to be a **compiled**, **multi-paradigm** language with a **static** and **strong** type model
67+

courses/fundamentals_of_ada/010_overview/02-big_picture.rst

Lines changed: 57 additions & 243 deletions
Original file line numberDiff line numberDiff line change
@@ -8,286 +8,100 @@ Language Structure (Ada95 and Onward)
88

99
* **Required** :dfn:`Core` implementation
1010

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
1512

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
12115

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`
16117

162-
.. container:: column
18+
* No additional syntax
19+
* May be present or not depending on compiler/run-time
16320

164-
.. image:: generic_template_to_instances.png
21+
- Real-Time Systems
22+
- Distributed Systems
23+
- Numerics
24+
- High-Integrity Systems
16525

16626
-----------------------------
167-
Object-Oriented Programming
27+
Core Language Content (1/3)
16828
-----------------------------
16929

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
18231

183-
.. code:: Ada
32+
* Language-defined types, including string
33+
* User-defined types
34+
* Static types keep things consistent
35+
* Strong types enforce constraints
18436

185-
procedure Pop (S : in out Stack) with
186-
Pre => not S.Empty, -- Requirement
187-
Post => not S.Full; -- Guarantee
37+
* Subprograms
18838

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
19042

191-
.. code:: Ada
43+
* Dynamic memory management
19244

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)
19448

195-
--------------------------
196-
Language-Based Concurrency
197-
--------------------------
49+
* Packages
19850

199-
* **Expressive**
51+
* Grouping of related entities
52+
* Separation of concerns
53+
* Information hiding
20054

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+
-----------------------------
23258

233-
* Explicit specifications
59+
* Exceptions
23460

235-
- Expressive
236-
- Efficient
237-
- Reasonably portable
238-
- Abstractions preserved
61+
* Dealing with **errors**, **unexpected** events
62+
* Separate error-handling code from logic
23963

240-
---------------------------------
241-
Standard Language Environment
242-
---------------------------------
64+
* Generic Units
24365

244-
Standardized common API
66+
* Code templates
67+
* Extensive parameterization for customization
24568

246-
.. container:: columns
69+
* Object-Oriented Programming
24770

248-
.. container:: column
71+
* Inheritance
72+
* Run-time polymorphism
73+
* Dynamic **dispatching**
24974

250-
* Types
75+
* Contract-Based Programming
25176

252-
- Integer
253-
- Floating-point
254-
- Fixed-point
255-
- Boolean
256-
- Characters, Strings, Unicode
257-
- etc...
77+
* Pre- and post-conditions on subprograms
25878

259-
* Math
79+
* Formalizes specifications
26080

261-
- Trigonometric
262-
- Complexes
81+
* Type invariants and predicates
26382

264-
* Pseudo-random number generators
83+
* Complex contracts on type definitions
26584

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+
-----------------------------
27488

275-
* Exceptions
89+
* Language-Based Concurrency
27690

277-
- Call-stack
91+
* Explicit interactions
92+
* Run-time handling
93+
* Portable
27894

279-
* **Command-line** arguments
280-
* **Environment** variables
281-
* **Containers**
95+
* Low Level Programming
28296

283-
- Vector
284-
- Map
97+
* Define representation of types
98+
* Storage pools definition
99+
* Foreign language integration
285100

286101
------------------------------
287102
Language Examination Summary
288103
------------------------------
289104

290-
* Unique capabilities
291105
* Three main goals
292106

293107
- **Reliability**, maintainability

courses/fundamentals_of_ada/030_basic_types/01-introduction.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,3 +228,13 @@ Type Model Run-Time Costs
228228
Y := X;
229229
Z := Y; -- no check required
230230
231+
--------------------------
232+
The Type Model Saves Money
233+
--------------------------
234+
235+
* Shifts fixes and costs to **early phases**
236+
237+
* Cost of an error *during a flight*?
238+
239+
.. image:: relative_cost_to_fix_bugs.jpg
240+
:height: 50%

0 commit comments

Comments
 (0)