This presentation belongs to the course "Developing Software that Matters". This course is being given by Franco Gasperoni to the second year students of the ENST in Paris. Distributed under the GFDL.
These are the condensed slides if you have to do the presentatin in 3 hours.
https://libre.adacore.com/Software_Matters/
9. Software Processes
• A Software Process is
– A set of activities (e.g. requirements, analysis, design, coding,
testing) combined and sequenced in a particular fashion to
produce software
• Recent trend: Agile Software Development
– Customer needs evolve with time
– Satisfying customers at delivery time (rather than at project
initiation) is more important than conforming to initial customer
requirements
Slide 9
13. Need to Structure and Organize
Organization / Structure is fundamental to:
• Engineering activities
– Buildings, software, planes, ...
• Many human endeavours
– Music, books, business corporations, ...
• Nature is structured
– Human body, plants, the universe, ...
Slide 13
14. Why do we Need to Structure & Organize Software?
• Divide the work among groups of people
• Helping people to understand the software
• Make software fixes possible
• Make software evolution possible
•…
Slide 14
15. Properties of an Ideal Software Architecture
• Loose coupling between components of the software
– Division of labor
– Components re-use
• No functionality/code duplication
• Code changes minimized when software evolves
• Code re-testing minimized when software evolves
Slide 15
16. Structuring Elements of Software
When creating a new system you identify its:
• Data types
– Kind of data that will be manipulated
• Operations
– Manipulations on the data
Slide 16
17. OOP vs SP
Two dimensions around which to organize software:
• Around its operations
– Structured Programming (SP)
• Around its Data Types
– Object-Oriented Programming (OOP)
Slide 17
18. Example
operations
related
types
op1() op2() op3() op4() op5()
X X X
A
X X X
B
X X X
C
Slide 18
19. SP: A centralized view of Software
operations
related
types
op1() op2() op3() op4() op5()
X X X
A
X X X
B
X X X
C
Slide 19
20. OOP: A distributed view of Software
operations
related
types
op1() op2() op3() op4() op5()
X X X
A
X X X
B
X X X
C
Slide 20
21. SP vs OOP: Where Differences Are Significant
The key discriminator between SP and OOP is change
• Change in operations
– What happens when new operations need to be added to an SP or an
OOP program?
• Change in data types
– What happens when new data types need to be added to an SP or an
OOP program?
Slide 21
22. New Operation
operations
related
types
op1() op2() op3() op4() op5() new()
X X X
A
X X X X
B
X X X X
C
Slide 22
23. New Operation: SP – a Good Choice
operations
related
types
op1() op2() op3() op4() op5() new()
X X X
A
X X X X
B
X X X X
C
Slide 23
24. New Operation: OOP – A Poor Choice
operations
related
types
op1() op2() op3() op4() op5() new()
X X X
A
X X X X
B
X X X X
C
Slide 24
25. New Data Type
operations
related
types
op1() op2() op3() op4() op5()
X X X
A
X X X
B
X X X
C
X X X
NEW
Slide 25
26. New Data Type: SP - A Poor Choice
operations
related
types
op1() op2() op3() op4() op5()
X X X
A
X X X
B
X X X
C
X X X
NEW
Slide 26
27. New Data Type: OOP - A Good Choice
operations
related
types
op1() op2() op3() op4() op5()
X X X
A
X X X
B
X X X
C
X X X
NEW
Slide 27
28. New functionalities can be
factored in few tagged types
Summary
Data type
changes
??
Use
Object
Use
Oriented
Object
Oriented
use Functionality‐Oriented
Functionality changes Slide 28
30. Programming Language Design Goals
•C
– A portable, higher-level assembly language
– No safety or security concerns
• C++
– An object-oriented language upwardly compatible with C
– No safety or security concerns
• Java
– Fix C++ insecurity problems (i.e. cannot create a virus in Java)
– No safety concerns
Slide 30
31. Ada
Industrial-strength version of Pascal designed to build:
• Safe software
• Secure software
• Software that needs to evolve
• Mixed-language software
• Language designed by an international team
– 1983: First version of the language
– 1995: Major revision (adds OOP, …)
– 2005: Latest revision
Slide 31
32. Some Industrial Applications in Ada
• Business-critical
– Canal+ Technologies: Pay-per-view, access control
– BNP: Trading Language
– Philips: Semiconductor assembly equipment
– Helsinki radiotelescope
• Mission-critical
– Astree: European-wide railroad signaling
– Weirton Steel - process controller
– Mondex electronic money
– Scanning Electron microscope
• Safety-critical
– Airbus A340
– Boeing 777
Slide 32
33. Ziegler’s Study: Comparing C & Ada
• 1995 VADS study
– 60 engineers, from 1984 ..1994 with MS degrees in computer science
– All knew C at hire. All programmed in both C and Ada.
• VADS
– About 4.5 million lines of code, 22000 files, cost >$28m over 10 years
2500000
2000000
1500000
ll in s
AL e
1000000
500000
0
C Code Ada Code Make Scripts Miscellany
Slide 33
34. Costs Per Feature During Implementation
cost/feature:
$350
$300
$250
$200
$150
$100
$50
$0
C C, including Makefiles ADA
Slide 34
35. Post-Delivery (User-Reported) Defects
1200
1000
800
C
600
Ad a
400
200
0
Critical De fects Seve re Defe cts Minor d efects T o ta l Defects
Slide 35
36. Summary
• Developing software in Ada is 60% cheaper than in C
• Code developed in Ada has 9 times less bugs than in C
• Was Ada consistently better? *YES*
– Over different subsets of VADS
– For experienced AND inexperienced programmers
– For both C experts AND Ada experts
– For the highest AND lowest rated programmers
• Was Ada harder to learn? *No*
• Was Ada code more reliable? *YES*
http://www.adaic.com/whyada/ada-vs-c/cada_art.html
Slide 36
37. From an Education Perspective
• Ada is a good language to teach good software practice
– Reliability, safety, security
• Ada allows to design SP and OOP software
• Free Software high-quality Ada environment available
– http://libre.adacore.com
– GNAT GPL Edition (Ada 2005)
– Linux, Mac OS, Windows
Slide 37