\begin{verbatim} *************************************** DEMETER TOOLS/C++ Quick Reference Guide *************************************** In file $OO/doc/Demeter-Tools-C++Quick-Reference (version 3, Winter 1995) A tool suite for adaptive object-oriented application development in C++. *** CONCEPTS class dictionary Describes the inheritance and the binary relation structure of your application. Serves as a lattice to propagate the functionality. (should reside in file cd.cd) propagation pattern Describes how the functionality is distributed over the classes. (should always reside in files with names of the form *.pp) *** GETTING HELP man demeter man TOOL-NAME As a last resort (after checking User's Guide and FAQ), send e-mail to demeter@ccs.neu.edu *** SIMPLEST TOOL USE Put your class dictionary into file cd.cd Put your propagation patterns into files of the form *.pp Put your input objects into file demeter-input Then call the commands demeter cp main.C.sample main.C Edit main.C near end where you call your propagation patterns. Then call again demeter You execute your program with run Whenever you change something, you call again demeter *** DESIGN TOOLS sem-check -n cd.cd Checks the class dictionary graph cd.cd. sem-check cd.cd Checks the class dictionary cd.cd, including the LL(1) conditions. xcddraw To develop class dictionaries graphically. cd-numbered-xref To produce a class dictionary cross reference listing. *** PROGRAMMING TOOLS demeter Makes Demeter act like a compiler. Put class dictionary in cd.cd, the main program in main.C and the propagation patterns in *.pp files and call demeter. The run command allows you to run your program. gen-imake (imake-sample is a synonym) Creates a sample Imakefile with default settings. gen-make (dmkmf is a synonym) Creates a corresponding Makefile with the Demeter "knowledge". make The Demeter super command with one goal: to create a compiled class library. run ... To run the application. *** TYPICAL TOOL USE EDIT cd.cd sem-check cd.cd gen-imake gen-make make run - empty class library works cp main.C.sample main.C EDIT demeter-input make run demeter-input - class library self-test works!! EDIT demeter-input EDIT *.pp - add functionality EDIT main.C - call functionality make - spread the functions and compile run demeter-input - do you get the right output? make clobber - when software is not maintained for an extended period. *** REGENERATION make *** SAMPLE CLASS LIBRARIES See directory $OO/sample-class-libraries. Class libraries are in subdirectories c-*/generated *** DEMO See directory $OO/demo File how-to-use tells you how to run the demo. *** SYNTAX (in simplified form, reflecting typical use) // is the comment character Propagation directives ---------------------------------------------------------------- // exactly one *from* *from* {A1, A2, ...} // zero or one *through* *through* // one or more edge patterns, separated by "," -> V,m,W , // construction edge with label m => V,W , // alternation edge :> V,W , // inheritance edge ~> V,W // repetition edge // zero or one *bypassing* *bypassing* // one or more edge patterns, separated by "," -> V,m,W , // construction edge with label m => V,W , // alternation edge :> V,W , // inheritance edge ~> V,W // repetition edge // zero or more *via* *via* {K1, K2, ...} ... // zero or one *through* and/or zero or one *bypassing* *via* {S1, S2, ...} ... // zero or one *through* and/or zero or one *bypassing* //zero or one *to* *to* {Z1, Z2, ...} Instead of V, W, or m the wildcard symbol "*" may be used. // *merge* and *join* *join* ( *merge* ( *from* A *via* B *to* E, // any *from* ... *to* *from* A *via* C *to* E), // any *from* ... *to* *from* E *to* K) // any *from* ... *to* Wrappers ---------------------------------------------------------------- Edge *wrapper* // edge pattern -> *,m,* // zero or one *prefix* (@ ... @) // zero or one *suffix* (@ ... @) Vertex *wrapper* // class-valued variables, one or more {A,B,C} // zero or one *prefix* (@ ... @) // zero or one *suffix* (@ ... @) Transportation pattern ---------------------------------------------------------------- *carry* // transported variables // broadcasting *in* P* p = (@ ... @) // optional, for initialization , // condensing *out* Q* q = (@ ... @) // optional, for initialization , // broadcasting and condensing *inout* R* r = (@ ... @) // optional, for initialization *along* // propagation directive, see above // defines transportation graph *at* A // update transported variable p = (@ ... @) *at* B // update transported variables q = (@ ... @), r = (@ ... @) // one or more wrappers, see above ... // *end* Propagation patterns ---------------------------------------------------------------- *operation* //signature void f(*in* B* b, *out* C* c) *traverse* // propagation directive, see above ... // zero or more transportation patterns, see above // zero or more wrappers, see above Class dictionary graphs ---------------------------------------------------------------- // zero or more class definitions // first class is start class // ordering of remaining class definitions is irrelevant // for single-inheritance class dictionary // construction class Meal = // zero or more parts // required part, construction edge Appetizer // required part, construction edge Entree // optional part, optional construction edge [ Dessert]. // alternation class Dessert : // alternatives, alternation edges, one or more ApplePie | IceCream // separator *common* // common parts, construction edges, zero or more WhippedCream. // repetition class Banquet ~ // repetition edge Meal {Meal}. Shrimps ~ // optional repetition edge {Shrimp}. // Parameterized classes Sandwich(S) = BreadSlice S BreadSlice. RecursiveList(S) : Empty(S) | NonEmpty(S). List(S) ~ S {S}. // Use of parameterized classes Meat = . Sandwiches = RecursiveList(Sandwich(Meat)). Class dictionaries Syntax may optionally appear around parts. A = "to-introduce" B "to-separate" C "to-terminate". B : C | D *common* "to-continue" B "to-separate" C "to-terminate". CommaList(S) ~ "to-start-collection" S {"to-separate-collection-elements" S} "to-end-collection". StatementList ~ "begin" Statement {";" Statement} "end". FruitList ~ "(" {Fruit} ")". \end{verbatim}