First quarterly report for the Northeastern EDCS project Karl Lieberherr, PI support: 1 summer month Boaz Patt-Shamir support: 3 summer months (one from overhead) Mitch Wand support: 1 summer month We organize the report by topics. Demeter/Java ------------ Demeter/Java was designed and partially implemented by Doug Orleans. It is used to generate Java code in two courses this fall. For examples of code which Demeter/Java can already generate, see the course directory at URL: http://www.ccs.neu.edu/research/demeter/course/f96/hw Demeter/Java was first written in Demeter/C++. It is in itself a powerful demonstration of adaptiveness: the C++ program produced automatically is by a factor 6 larger than the adaptive C++ program. The next step is to get enough functionality in Demeter/Java so that we can reimplement it in Demeter/Java and make it available on the net. Demeter/Java uses externally developed tools such as a parser generator for Java, called CUP, from the Georgia Tech. As Java compiler, we use guavac, a GNU compiler. To reuse the extensive Demeter/C++ documentation, we have written a transition document which explains the differences between Demeter/Java and Demeter/C++. It is at URL: http://www.ccs.neu.edu/research/demeter/course/f96/demjava/FromDemeterC++ToDemeterJava.txt UML --- In collaboration with professors Palsberg and Wand, we have explored UML. We have developed an LL(1) grammar for class diagrams and defined a subset of UML class diagrams which correspond to Demeter class dictionaries. This subset serves as a starting point and we add more UML features as we progress. UML poses the problem of how to express traversals succinctly in dense graphs with bidirectional edges. We have explored two alternatives: Use alternative succinct subgraphs specifications, like "shortest path" or "no loop" constraints. Use complete subgraph specifications but provide tools for maintaining them. This approach is taken by Michael Werner in our college. Improving the modularity of class graphs ---------------------------------------- While developing Demeter/Java and in other projects, we noticed that class graphs get quickly overloaded although much information is only needed on a task based basis. Therefore, we explored ways to define structure in task definitions. This improves modularity and leads to easier to understand programs: the structural information is now localized in tasks and not centralized in one class graph. We will refine the idea and plan to implement it in Demeter/Java. Context objects --------------- Linda Seiter has completed her Ph.D. thesis which introduces context objects and other evolution ideas. See URL: http://www.ccs.neu.edu/home/lieber/theses-index.html Seiter, Palsberg, and Lieberherr prepared a journal version of the conference paper (SIGSOFT '96, Foundations of Software Engineering) for submission to a journal. See URL: http://www.ccs.neu.edu/research/demeter/biblio/context.html Professor Wand has given us extensive feedback on the paper. Our experience in using context objects is very positive. They are very supportive to evolutionary softare development. For example, assume you have a program dft() for dft traversal of directed graphs. In oder to make the program into a cycle-checking program, you only need to attach an object of the following class to the call of dft: class CycleCheckVisitor { private Stack s; before Adj { s.push(host); if (s.contains_duplicate(host)) {System.out.println("cycle found");}} after Adj { s.pop(); } } This kind of incremental behavior specification is very convenient. We started to look into the literature on composition of meta objects, starting with the OOPSLA '95 paper by Pierre Cointe. This work is relevant to composing context objects. Currently we have only before and after designations for context methods. We also need conditions and we need to study how context methods are invoked for composed context objects: o.f[c1,c2,c3]() The default rule is for each class: before from c1 before from c2 before from c3 traversal after from c3 after from c2 after from c1 Compilation of Adaptive Programs -------------------------------- Professors Patt-Shamir and Palsberg have proven the compilation algorithm by Lieberherr and Pradhan correct. The result is a technical report at URL: This algorithm will be used extensively in Demeter/Java. Distributed Systems ------------------- We have followed the work at EPFL Lausanne on protocol classes for designing reliable distributed environments since our visit to ECOOP '96. A Java framework is offered for implementing distributed systems. We investigate its suitability for integration with Demeter/Java. Metaphoric Polymorphism ----------------------- The ECOOP '96 paper: @INPROCEEDINGS{rinat:metaphoric, AUTHOR = "Ran Rinat and Menachem Magidor", TITLE = "Metaphoric Polymorphism: Taking Code Reuse One Step Further", BOOKTITLE = ecoop, YEAR = "1996", ADDRESS = "Linz, Austria", PAGES = "449-471", EDITOR = "Pierre Cointe", PUBLISHER = spcs } is related to our work. In AP we have implicitly a concept of metaphoric computation: all computations initiated by the adaptive program P and refinements of P. We are considering a set of refinement transformations for adaptive programs. For example, to go from a depth-first-traversal to a cycle checker, the increment is to define a context class, create an appropriate instance and pass it to visitor. We would like to express such refinements in a refinement language for evolutionary software development. Traversals ---------- Professor Wand pointed that the iterative traversals which we currently use are not powerful enough in certain situations. Sometimes recursive traversals are needed. They require a combination function to combine the results of the calls. We are trying to understand the tradeoffs between iterative and recursive traversals. Collaboration with other groups ------------------------------- Our focus has been on absorbing existing technologies, Java and UML, and integrate them with Adaptive Programming. This is an important kind of collaboration. We collaborate directly with Gregor Kiczales' project on Aspect-Oriented Programming. Crista Lopes, a Ph.D. student at Northeastern, is acting as technology exchange agent.