Topics for Exam 2 in Com S 541 This exam covers topics from homeworks 3-4, including AspectJ and your design of Aspect Smalltalk. REMINDERS The exam will be open book, open notes. (Warning: don't expect to learn the material during the exam, you won't have time! A good idea for studying is to condense your notes to a few pages of ready reference materials.) If you need more space, use the back of a page. Note when you do that on the front. This exam is timed. We will not grade your exam if you try to take more than the time allowed. Therefore, before you begin, please take a moment to look over the entire exam so that you can budget your time. Clarity is important; if your diagrams or programs are sloppy and hard to read, you will lose points. Correct syntax also makes a difference for programming questions. READINGS Primarily, you should read The AspectJ(TM) Programming Guide (http://aspectj.org/doc/dist/progguide/index.html); Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold, "An Overview of AspectJ," In J. Lindskov Knudsen (ed.), ECOOP 2001 --- Object-Oriented Programming 15th European Conference, Budapest Hungary, pages 327-353, Volume 2072 of Lecture Notes in Computer Science, Springer-Verlag, Berlin, June, 1997 (http://aspectj.org/documentation/papersAndSlides/ECOOP2001-Overview.pdf); Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold, Getting started with AspectJ, Communications of the ACM, Vol 44, num 10, pp. 59-65, Oct. 2001 (http://doi.acm.org/10.1145/383845.383858). If you have time, see the course web site and also the course syllabus for other readings. TOPICS In the following, I use + to denote relatively more important topics, and - to denote relatively less important topics. Topics marked with ++ are almost certain to be on the exam. 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 + AspectJ programming; be able to: + give output of AspectJ code, especially for code that uses pointcuts and advice ++ write aspects that advise existing Java code, for example, to write development aspects [HW3: FibTracing, BlankLines, FibTiming], or production aspects [HW3: FibMemo] + write aspects that introduce declarations into existing Java code [HW3: problem 7] TERMS AND CONCEPTS You should be able to explain and use (in problems or essays) the following concepts (with appropriate comparisons to related concepts). You should be able to give examples of these concepts. + AOP design and general concepts: - How does AOP differ from the use of reflection? + How does AOP relate to OOP? - What uses are typical for AOP? + What is a cross-cutting concern? Give an example + What is tangling? Give an example. - Why don't OOP design patterns solve the problems that AOP tries to solve well? + Describe the semantics of AspectJ features. + What is a join point? A pointcut? Advice? + Describe the kinds of changes aspects in AspectJ can make to a program [HW4, problem 1] + Describe the meaning of different kinds of advice. + Describe the meaning of the different patterns in AspectJ. + Explain how context exposure works in AspectJ. + Describe the advantages of a programming language approach, such as AspectJ, as opposed to approaches outside of a language, such as edting scripts. [HW4, problem 2] + Describe the advantages or utility of various features AspectJ [HW4, problem 3] + Describe type checking in AspectJ and its problems, e.g., for around advice [HW4, problem 4] + How can one use AspectJ to enforce programming rules, such as layering of software? + How can one use AspectJ to change how exceptions are propagated or handled? + How can one use AspectJ to help glue independently developed libraries of code together? + Aspect Smalltalk + Describe your design for Aspect Smalltalk, for example in some feature, by giving the grammar of that feature, its semantics, and some examples [HW4, problem 5] + Consider some feature like one in AspectJ, and explain how it could be incorporated into an Aspect-oriented version of Smalltalk [HW4, problem 5]