Topics for test on the OO Paradigm, Smalltalk, and a bit of Logic Programming and lambda Prolog The test will be open book, open notes. (Warning: don't expect to learn the material during the test, you won't have time! A good idea might be to try to condense your notes to a few pages of ready reference materials.) In the following, I use + to denote relatively more important topics, and - to denote relatively less important topics. All of these are fair game, but if you have limited time, concentrate on the ones that are more important first (and in those, the ones you are most uncertain about). SKILLS + Smalltalk programming; be able to: + give output of Smalltalk code ++ design and write code for classes in Smalltalk + based on specifications + using inheritance, as subclass of collection + how to use dispatch instead of explicit tests in code - write code using double dispatch - write code using the visitor pattern + build part of a framework in Smalltalk - lambda Prolog programming; be able to: + give the output of queries ++ specify simple relations over lists + specify simple relations over algebraic data types (such as the naturals, or trees) TERMS AND CONCEPTS Although the terms and concepts parts will focus on the object-oriented paradigm, and to some extent logic programming, I am fond of asking "integrative" and compartiive questions. And we have a great opportunity to do that this semester. For example, I might ask you to compare the support for polymorphism in Smalltalk vs. Haskell, or to discuss some aspects of ``making programming easier'' in Haskell and Smalltalk. Also, I might ask for some comparisons between Smalltalk or Haskell and lambda Prolog (e.g., what are the differences in pattern matching...) You should be able to explain and use (in problems or essays) the following (with appropriate comparisons to related concepts): + Smalltalk related: + goals of OOP (vs. the other paradigms) + class, subclass, object + protocol, behavioral protocol + type, subtype, behavioral subtype + components (compostiion) vs. inheritance (and when to use each) + inheritance, multiple inheritance (advantages and disadvantages) + self, super, and their use in methods (method inheritance) - factoring methods to allow for better method inheritance + type errors, strong typing, dynamic typing (vs. static typing) + dynamic binding and message passing vs. static overloading + polymorphism + equality in Smalltalk, = vs. == + aliasing, exposing the rep (and how to avoid it) + ``binary'' methods (and ways to deal with them) - why subclasses are not subtypes when binary methods are present + abstract and concrete classes, frameworks + multimethods (tuples) and how they differ from single dispatch - lambda Prolog related: + the goals and purpose of logic programming (vs. the other paradigms) + to what extent lambda Prolog fulfills those goals + fact, rule, goal, query + logical variables + substitution, unifier, most general unifier, unification + backtracking - resolution - cut (!)