Hi Josh: Thank you very much for answering all those questions. You answers are excellent. Two months ago you started with your exploration of Demeter and you gained all this knowledge mostly through selfstudy. Here are the remaining answers: >From jayantha@ccs.neu.edu Wed Jul 30 13:04:17 1997 >I received a few questions about Demeter - some i'm not sure about. >When did the Demeter project begin? It started in 1984 at GTE Laboratories under the name GEM. For more info., see page Roman 31 (xxxi) in my book on AP, section History of the Demeter Project: ftp://ftp.ccs.neu.edu/pub/people/lieber/selected-book-chapters.ps The work on the coordination aspect started with Crista around 1993. >Was the focus always on adaptive software? Initially the focus was on using parsing to make objects more robust. Already a GTE we had universal traversal functions which we generated. As traversals became more and more important we started around 1990 to specify them instead of writing them in detail. That was the begiining of our work on adaptive software. See also: ftp://ftp.ccs.neu.edu/pub/people/lieber/selected-book-chapters.ps -- Karl =========================== From jayantha@ccs.neu.edu Wed Jul 30 14:14:57 1997 From: "Joshua C. Marshall" To: Karl Lieberherr Subject: questions Here are the questions I have been sent - he would like a reply before friday, so if you can think of anything else to add before then... > 1. I want to Know at least 5 things that have the demeter method, in the > context of adaptive, than dont't have the other methods of software > developmnet. o Demeter allows behavior (methods) to be defined independently of non-essential class structure. In other words, methods do not depend on the intermediate classes that may exist between "important" classes. This is known as loose coupling. o Aspects of a program which are not part of either class structure or behavior are separated from the main body of the program. For example if a program uses multiple threads during execution, there may be need for synchronization. This synchronization is not an important part of method behavior or class structure, but rather a constraint on the timing of method execution. Therefore concurrency control is extracted from the main program into a separate file devoted exclusively to thread synchronization. > 2. I want to know in what year began the proyect demeter, and whether > always was focus to adaptive software. > 3. What is the principal features that use the method to make the > software adaptive. Most often, when modifications are made to class structure, the general relationships between classes do not change. For example, you may represent games of chess using a ChessBoard class which has an 8x8 array of ChessPieces. You may later decide you want to separate the storage of white pieces from black, and give the ChessBoard class two linked lists of pieces instead of one large array. Internally these representations are very different, but conceptually they are similar - a ChessBoard contains ChessPieces. Now suppose you would like to do an operation on each ChessPiece (eg. tell it to print out its name and position). First define a traversal: traversal allChessPieces(PrintingVisitor v) { via ChessBoard to ChessPiece; } Also define PrintingVisitor: PrintingVisitor { before ChessPiece (@ host.print(); @) } Assume ChessPiece.print() is defined in a typical way. Now when a PrintingVisitor is passed to the traversal "allChessPieces", Demeter will do a depth-first-search of the object structure in memory. Any time an object is reached which satisfies the traversal (in this case, any object which is a ChessPiece contained within some sub-structure or sub-class of ChessBoard), the object is sent a print() message. If a ChessPiece is not reachable through a ChessBoard (eg. if it has been captured and is now stored in a separate structure), it will not be sent the message. Regardless of the class structure you choose, the search will reach all object satisfying the traversal. > 4. Why the programs make with this method are shorters than others > programs make with others methodologies. This is partly answered in my response to #3. The behavior files are generally shorter than programs using other methodologies because there is no need to manually write methods which do nothing more than pass a call from class to class; this "message passing" is done automatically. Also, although less important, there is the structure of the class dictionary - it defines both the class structure and the syntax used to instantiate it. \josh