Managing Software Development CSG 110 Spring 2005 Karl Lieberherr Due date: January 13, 2005 Homework 1: Multi-Dimensional Separation of Concerns ==================================================== Read chapters 1 through 3 and 7 in the text book. This homework is about chapter 3. Install DemeterJ, DJ, AspectJ and DAJ on your computer. For installation of DJ and DemeterJ. http://www.ccs.neu.edu/research/demeter/software/docs/install.html DJ information: http://www.ccs.neu.edu/research/demeter/DJ/ DemeterJ information: http://www.ccs.neu.edu/research/demeter/DemeterJava/ http://www.ccs.neu.edu/research/demeter/DemeterJava/UserManual/ For installation of AspectJ. http://www.ccs.neu.edu/home/lieber/courses/csg110/sp05/CCS_AspectJ_Usage.html For installation of DAJ. http://www.ccs.neu.edu/home/lieber/courses/csg110/sp05/DAJ_Usage.html DAJ information: http://www.ccs.neu.edu/research/demeter/DAJ/ In this homework we practice multi-dimensional seperation of concerns in three styles: Part 1: Multi-Dimensional Separation of Concerns with Java, DemeterJ and DJ ============================================================================== Directory: expr/demeterj-dj We use DemeterJ to simulate open classes and as a generator of code for generic concerns parameterized by a class dictionary (e.g., Parsing, Printing, Displaying, etc.). We use DJ for application-specific concerns. Part 2: Multi-Dimensional Separation of Concerns with AspectJ, DAJ and DJ ========================================================================= Directory: expr/daj-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 DJ for application-specific concerns. Traversals are interpreted. Part 3: Multi-Dimensional Separation of Concerns with AspectJ and DAJ ===================================================================== Directory: expr/daj 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 DAJ (strategy and traversal declarations in *.trv files) for application-specific concerns. Traversals are compiled. For all three parts the expr/*/gen subdirectory contains the generated Java or AspectJ code. This code is for illustration only: you should not modify this code. Instead you modify the files in the super directory of the /gen directory. For all three parts, your task is to implement the following semantic checking concern as a hyperslice: For each Compound-object where the operator is a unary operator, there must be exactly one argument. For each Compound-object where the operator is a n-ary operator, there must be two or more arguments. The task is to write a small amount of mostly Java code. Put your hyperslice into the following files: expr/daj-dj file: CheckAspectUsingDJ.java expr/daj files: SemanticChecking.trv and SemanticCheckingVisitor.java demeterj-dj file: program.beh For parts 1 to 3 turn in your modified files. Part 4: In expr/demeterj-dj multiple hyperslices (besides the semantic checking hyperslice) are implemented. Give a precise definition of each hyperslice covered in program.beh and program.cd. What is the "kernel" hyperslice mentioned on page 47? You have multiple ways of finding information about the hyperslices: 1. Inspecting the DemeterJ documentation. 2. Inspecting the Java source code in /gen. For example, DisplayVisitor.java. 3. Running the program using "demeterj test". In expr/daj there is no display hyperslice but the kernel hyperslice and the syntax checking (parsing) hyperslice are present. Which files contain the AspectJ code for the parsing hyperslice? Which file contains the specification of the parser? Part 5: Discuss how hyperslices help or hinder software development. Do they promote parallel software development: can multiple developers work simultaneously? How does this affect the management task? Should the unit of responsibility for a programmer be a concern or a class? Homework submission is electronic and hardcopy submission. This will allow the teaching assistant to run your programs and mark your printed copies. Please turn in your answers in hardcopy at one of the following places: (1) Bring it to the class room and hand it to me. (2) In 202 WVH : Put it into the teaching assistant's mailbox. (3) In 202 WVH : Put it into my mailbox. (4) If all those possibilities don't work for you, slide it under my office door. For electronic submission to Blackboard, the format for files should be: hw?_[lastname].[ext] lastname = your last name ext = zip, doc, ps, pdf, tar.gz, tgz