PHASE 1: Team members of the testing 2 group: Han H. Li (hanl@ccs.neu.edu) Mike Kalpas (kalpas@ccs.neu.edu) ...................................................................... Project: The purpose of this project is to develop code which can be used to test that Demeter/Java follows the rules defined for the TRAVERSE interpreter described in Ch.9, pages 256 to 258 of "Adaptive Object-Oriented Software -- The Demeter Method". ...................................................................... Directory: /proj/demsys/com1205/w97/kalpas/project/phase* contains all the files for all phases of the project. ...................................................................... Credit: Phase1 is a program translated from Demeter/C++ files located in this directory: /proj/adaptive/lieber/regression-test/c-empty-methods-select/ ...................................................................... to run our program: 1) copy these four files into a directory phase*.beh phase*.cd phase*.input expected 2) use the command j-gen-make to ceate a GNUmakefile 3) edit the GNUmakefile, locate program and change to phase* 4) execute the command make to compile the program 5) to run the file after the compilation type: java Main phase*.input expected ...................................................................... What the program is doing in this phase: In this phase, the program is testing the "immediate-first" rule of part ordering(bottom of p.256). This rule says that the part objects described by immediate parts of a subclass are visited before the part objects described by immediate parts of the superclasses. The program tests this rule in the following manner. The program reads in input and creates objects of the abstract class Symbol, which has a common symbolName Ident and can either be an empty RegularSymbol or a LabeledSymbol, which as a labelName Ident. A traversal function goes to Symbol and LabeledSymbol and passes a visitor that, at each Symbol, calls from the host class a function slot_name() that retrieves either a symbolName or a labelName and adds it to a Vector. After the first Vector list is completed, the program reads in a second input that should be the expected result of the first Vector, creates a second Vector out of the input, and then calls a function to compare the two vectors. If they are equal, the program returns "Success!", and if they are different, the program returns "Failure!". ...................................................................... Format for phase1.input: "(" ")" around entire list "," between each Symbol element "<" ">" around each labelName Sample: (a, B, C, d, E) expected format is same as above, but without labelName expected (from above Sample): (a, b, c, d, e) ...................................................................... What to expect in phase2: In phase 2 we will implement a program to check the correct traversal order of wrappers using the prefix-super-sub and suffix-sub-super rules. See page 258 of the Adaptive book for a description of these rules.