Managing Software Development CSG 110 Spring 2005 Karl Lieberherr Due date: Jan. 27, 2005 Homework 2: Multi-Dimensional Separation of Concerns continued ============================================================== Research project suggestions: AOSD and the Capability Maturity Model AOSD and Software Project Management Plans AOSD and patentability: What patents cover AOSD technology? Could they be defended in court? Software development standards for AOSD Read chapters 5 AOP: A historical Perspective 6 AspectJ 25 Developing software components with Aspects In this homework we practice multi-dimensional seperation of concerns with AspectJ, DAJ and DJ ========================================================================= Directory: display-visitor-in-dj We use AspectJ to simulate open classes (using intertype declarations). We use DAJ as a generator of code for generic concerns parameterized by a class dictionary (currently only Parsing). We use Java with DJ for generic and application-specific concerns. Traversals are interpreted. Your task is to implement the following: Part 1: Display visitor for DAJ using DJ ======================================== A fragment of the code is in directory display-visitor-in-dj. Achieve a functionality as close as possible to the functionality of the DemeterJ display visitor. The task is to write a small amount of Java code. Put your hyperslice into file: DisplayVisitorUsingDJ.java How can you make the display method generic so that it can be used with any class dictionary. In other words, how would you offer the display visitor as a reusable component? Is this component (the display visitor) useful to any Java program? Is there a dependency on DAJ? If there is no dependency on DAJ: - how would you offer the display visitor to Java users? - turn in your reusable component as a .jar file and provide the documentation needed to use the jar file. Part 2: Evaluation of expressions ================================= A fragment of the code is in directory display-visitor-in-dj. Implement the standard expression semantics. For example: (+ (+ 3 5) 7 ) = 15 Put your hyperslice into file: EvalAspect.java For parts 1 to 2 turn in your modified files. Part 3: Using AspectJ ===================== Remove the following from Main.java: System.out.println("output of Display hyperslice ------------------"); m.display(); System.out.println("output of Evaluation hyperslice ------------------"); m.eval(); Write two AspectJ aspects, InvokeDisplay and InvokeEval, that produce the equivalent of the 4 statements. The first aspect "adds" the first two statements and the second aspect "adds" the third and fourth statement. In other words, we want to keep Main.java clean and want to add calls to the two hyperslices using aspects. Make sure that display() is invoked before eval(). Turn in your two aspects InvokeDisplay and InvokeEval. Part 4: Using Eclipse ===================== Install Eclipse on your computing platform. See file Eclipse_Usage.html in the course directory. Use the AspectJ plugin for Eclipse to visualize the AspectJ code. Turn in a screenshot of Main.java that indicates where InvokeDisplay and InvokeEval influence the program.