Managing Software Development CSG 110 Spring 2005 Karl Lieberherr Due date: Feb. 10, 2005 Homework 4: Writing a Software Development Plan =============================================== Reading: Aspect-oriented Software Engineering Chapter 17: Engineering Aspect-Oriented Systems by Blair et al. Chapter 19: Generic Aspect-Oriented Design with Theme/UML Chapter 21: Concern Modeling for Aspect-Oriented Software Development by Sutton/Rouvellou Efficiency: Chapter 15: JMangler by Kniesel/Costanza/Austermann Chapter 31: Dynamic Aspect-Oriented Infrastructure by Popovici/Alonso/Gross For the remaining homeworks/project you may work in groups of two and practice pair programming. Part 1: ======= The goal of this assignment is to write a software development plan for an AspectJ Library called DJ-ERE that implements DJ functionality for a regular-expression-style traversal language. The implementation language is AspectJ. This means that you should use aspect-orientation throughout the life cycle of the project. Tools similar to DJ-ERE are available: http://jakarta.apache.org/commons/jxpath/ http://www.research.ibm.com/xj/applications.html Those tools use XPath to navigate through Java objects. The plan contents: 1. Goal and objectives: What is to be done as well as the criteria for determining project success. 2. Work Breakdown Structure: subdivide the project into tasks. 3. Project Schedule: a schedule for the key tasks and deliverables produced. Write two schedules: one person (you) and two persons (you and a team mate) schedule. How many hours will it take to complete the project? Which work can be done in parallel? Important: implement the product in small incremental steps. There is a group of users who prefer to write the strategies in regular expression style. The reason is that regular expressions are a well understood model for writing patterns. They also offer more expressiveness Enhanced regular expression language (ERE): A path in a graph is a sequence v1 l1 v2 l2 ... vn where v1, ... ,vn are nodes and l1, ... ,ln-1 are labels. The regular expressions define sets of paths. v1 is called source and vn is called target of the path. Extended regular expressions must satisfy the rule that nodes and labels alternate. Atomic expressions: A The traversal at vertex A any The traversal at any vertex l lab A label with name lnk anyl is a special case of a label (unnamed) For combining expressions, the usual regular expression crowd of operators: . concatenation (source and target must be same) & intersection | union * repetition ! negation Note that A is like an empty string; the traversal that just sits at vertex A. As with all empty strings, A.A = A Translation of strategies to ERE (enhanced regular expressions): from A to B (. A (* anyl any) anyl B) from A to * (. A (* anyl any)) from A through ->*,lnk,* to B (.A (* anyl any) l lnk (* any anyl) B) from A bypassing ->*,lnk,* to B (.A (! (. (* anyl any) l lnk (* any anyl))) B) from A via B to C (. A (* anyl any) anyl B (* anyl any) anyl C) from A bypassing B to C (. A (! (. (* anyl any) B (* anyl any) anyl)) C) d1 join d2 (. [d1] [d2]) d1 merge d2 (| [d1] [d2]) d1 intersect d2 (& [d1] [d2]) not d1 (! [d1]) where [x] is the translation of x into regular expressions. The extended regular expression language has advantages over the strategy notation: it is more expressive. The following examples: (! (. C anyl (! A) anyl B (* anyl any) l x D anyl (| X Y) (| l u l v) any)) // from A to B through one link not called x (. A (! l x) B) cannot be expressed as a strategy in DJ. The following is illegal: (. A B) The correct version is: (. A anyl B) The following is illegal: // from A through 3 links to a vertex (. A anyl anyl anyl any) The correct version: (. A anyl any anyl any anyl any) The requirements specification for ERE is left vague intentionally. It is your job to make them more precise. The lectures will help with this task. Here are some tips from "The Pragmatic Programmer" book: Don't Gather Requirements - Dig for Them Don't Think Outside the Box - Find the Box Some Things Are Better Done Than Described ------------ Your task is to write a software development plan for this modified DJ project where strategies are specified using extended regular expressions. The implementation for this project is all in AspectJ and you can reuse as much as possible exisiting DJ library and AP library code after appropriate refactoring into an aspect-oriented style. A part of your plan is the class dictionary for the new traversal language. It will help you to decide on incremental program phases. Turn in your project plan with the three elements mentioned earlier. Part 2: ======= Your DJ-ERE library is impacted by an additional concern: efficiency. The way DJ is implemented now, traversals are interpreted and this might make them 10 times slower than manually written code. In your plan in Part 1 you were not concerned with efficiency for DJ-ERE and you probably have followed a DJ appraoch. Adjust your software development plan from Part 1 and include the steps necessary to produce a more efficient system.