Title: Ada%20as%20a%20%20Language
1Ada as a Language
Teaching
- Ehud Lamm
- The Open University of Israel
2Context
- Current course Software Engineering with Ada
(Booch). - Good, but perhaps not good enough.
- Ada perceived as hindrance.
- I examined several Java textbooks, and discovered
Lisokvs Program Development in Java. - What should be our next step?
-
3Why How
- Undergraduate SE course (CS students)
- Classic Software Design
- Traditional approach (imperative, OOP)
- Essentials of Software Engineering
- Modularity, Reliability, Readability,
Flexibility, Software Life Cycle - University education
4Why How
- Practical course
- Challenging design problems
- Programming Should be Fun
- Not just getting it to work
- Students evaluate and re-evaluate their designs.
- Make the language invisible
5Course Outline
- Data Abstraction
- ADT/ADO
- Generic Units
- Inheritance
- Basic Tasking
- Interface/Implementation
- Adequacy
- Operation Categories
- Exceptions
- Pre/Post Conditions
- Invariants
- Flexibility
- Parameterization
- Separate Compilation
- Combining abstractions
- Runtime Polymorphism
- Heterogenic collections
- Classwide/Dispatching
- IS-A (LSP)
- Composition (HAS-A)
6Q1 Log file
- Log ?
- Gen_Log ?
- EventClass ?
- FilterClass
- WriterClass ?
- Dual Buffering
7Q2 Priority Queue
Priority is priv. with func lt(..)
Priority is (ltgt)
array of queues
sorted linked list
8generic type Struct is lim. priv. type Elem
is priv. with proc Insert with proc
Remove package Any_Struct is end
Struct is new Any_Struct(ltgt)
Package Protect_Struct protected type
Struct . end
9pack BST --Binary_Search_Tree
func BST.Max..
10generic type Item is priv. package Sets is
type Set is abs. tagged null rec end
generic with func lt(I1,I2Item) package
Sets.Sorted_List is type Set is new Sets.Set
with priv.
11Does the choice of programming language really
matter?
12No
13In theory, theres no difference between theory
and practice In practice, there is.
14Ideal Language
Ada
Java
- Rich type system
- Information hiding
- Explicit interfaces
- Value semantics
- Genericity
- Inheritance
- Garbage collection
- Design by Contract
- First-class functions
- Rich libraries, variety of tools
15Language Community
- Libraries
- Reusable code
- Tools (e.g., VS IDEs, diagramming, DbC, etc.)
- Tutorials/textbooks
- etc.
16Problematic features (Ada)(in my experience)
- Many kinds of Interfaces
- Access to subprograms (accessibility)
- Controlled (vs. other approaches to
destructors/constructors) - Controlled Generics
- Controlling child visibility
- Verbosity (exercises take too much time)
17Problematic features (Java)
- Conjecture. Let me know what you think.
- The type system
- Reference semantics
- Low level concurrency
- Generics are coming..
18The textbooks
- A language cant survive without good textbook,
for all levels and needs. - Liskovs book is much more suited for an academic
SE course.
19Conclusions
- Ada is still a strong candidate for a teaching
language for SE - Most of the technical problems can be solved
rather easily. - Better error messages should help with the
remaining issues. - The language isnt the problem Good News and Bad
News - Community and Cultural roadblocks
20Conclusions
- Can we and should we try to change the way Ada is
perceived in universities? - How?
- Evangelism
- Textbooks
- GNAT
- etc.
21Thank You
Any Questions?