1 / 21

Ada as a Language

Ada as a Language. Teaching. Ehud Lamm The Open University of Israel. Context. Current course: Software Engineering with Ada ( Booch ) . Good, but perhaps not good enough. Ada perceived as hindrance.

trung
Download Presentation

Ada as a Language

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ada as a Language Teaching Ehud Lamm The Open University of Israel Ada-Europe’2003

  2. Context • Current course: Software Engineering with Ada (Booch). • Good, but perhaps not good enough. • Ada perceived as hindrance. • I examined several Java textbooks, and discovered Lisokv’s Program Development in Java. • What should be our next step? Ada-Europe’2003

  3. Why & 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 Ada-Europe’2003

  4. Why & 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 Ada-Europe’2003

  5. Course 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) Ada-Europe’2003

  6. Q1: Log file Log  Gen_Log  Event’Class  Filter’Class Writer’Class  Dual Buffering Ada-Europe’2003

  7. Priority Queue Priority Queue Priority Queue Q2: Priority Queue Priority is priv. with func “<“(..) Priority is (<>) array of queues sorted linked list Ada-Europe’2003

  8. generic 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(<>) Package Protect_Struct protected type Struct …. end; Ada-Europe’2003

  9. with pack Any_Iter(<>) function Max(S) … begin Start(S); while More_Elements(S) loop …. Next(S); end loop; End; pack BST --Binary_Search_Tree func BST.Max.. Ada-Europe’2003

  10. generic type Item is priv. packageSetsis type Set is abs. tagged null rec … end; generic with func “<“(I1,I2:Item); packageSets.Sorted_Listis type Set is new Sets.Set with priv. Ada-Europe’2003

  11. Does the choice of programming language really matter? Ada-Europe’2003

  12. No but... Ada-Europe’2003

  13. In theory, there’s no difference between theory and practice; In practice, there is. Ada-Europe’2003

  14. ‘Ideal’ 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 Ada-Europe’2003

  15. Language Community • Libraries • Reusable code • Tools (e.g., VS IDEs, diagramming, DbC, etc.) • Tutorials/textbooks • etc. Ada-Europe’2003

  16. Problematic 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) Ada-Europe’2003

  17. Problematic features (Java) • Conjecture. Let me know what you think. • The type system • Reference semantics • Low level concurrency • Generics are coming.. Ada-Europe’2003

  18. The textbooks • A language can’t survive without good textbook, for all levels and needs. • Liskov’s book is much more suited for an academic SE course. Ada-Europe’2003

  19. Conclusions • 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 isn’t the problem: Good News and Bad News • Community and Cultural roadblocks Ada-Europe’2003

  20. Conclusions • Can we and should we try to change the way Ada is perceived in universities? • How? • Evangelism • Textbooks • GNAT • etc. Ada-Europe’2003

  21. Thank You Any Questions? Ada-Europe’2003

More Related