Some notes on John's comparison: Project is at: http://www.ccs.neu.edu/research/demeter/course/f97/projects/QuirkCompiler Benefits of Demeter/Java: 1. Professor does not have to prepare scanner and parser. Students master entire project from scratch. 2. It is easy to add new features once a basic collection of strategies and visitors are available. Programs are more flexible. 3. Programs are more understandable provided the reader knows the concepts of AP. -- Karl jcurry@ccs.neu.edu Sat Dec 13 14:35:03 1997 From: John Curry To: lieber@ccs.neu.edu Subject: project information Hello Professor Lieberherr, Here is the additional information regarding my class project you asked for. To give you more information I looked on the Demeter / Java home page under the proposed projects entry. In the section pertaining to evaluation projects, it appears you would like information related to statistics of the adaptive implementation of my project compared to the orignial implementation, comments on the flexibility of the system, comments on whether adaptiveness helps, and comments on whether the software is more understandable. 1. STATISTICS. The original project was implemented in C as a compiler. In that project the scanner and parser were supplied by Professor Clinger. Only the code generation portion of the compiler was written by the students. My course project for COM3360 was implemented in Demeter / Java as an interpreter. This interpreter did not rely upon any previously generated code. The code generation of the C compiler required approximately 880 lines of C code. The entire implementation of the interpreter required apporximately 570 lines of Demeter / Java code. The time spent by myself working on the COM3360 project is estimated at 80 hours The time spent on the compiler for CO3355 was approximately the same. However, the time spent on the compiler was not measured at the time of the project so any time comparisions are estimates. 2. FLEXIBILITY The best measure of flexibility for my project is the time required to add support for a new feature of the interpreter. Towards the end of the project, after I had come up the learning curve of Demeter / Java, the time to add a new feature (example, support for if/then/else, or while loops) was literally measured in minutes. I estimate that 30 minutes would be sufficient time to update the .cd file, add code to any needed visitors, modify traversals if needed, rebuild the system, and test. Although I did not keep any data upon the original implementation of the compiler, I recall the time to add new features was longer (I would guess by a factor of 2X - 4X). Therefor I believe programming in traversal visitor style does promote development of flexible systems. 3. DID ADAPTIVENESS HELP? As stated in the above section (flexibility) I do believe adaptiveness help significantly with the development of the system, especially when used with a well planned growth plan. It was much easier to add functionality to the system by only modifying visitors (as oposed to modifying several classes) 4. IS THE SOFTWARE MORE UNDERSTANDABLE? Provided that the individual reading / maintaining the project fully understands both the Demeter / Java tools, and the traversal visitor style, the code is more understandable. This is due to the fact that the functionality of the system is localized into the visitor classes, instead of being distributed across the entire class structure.