How to program it. How to solve it. George Polya Translating requirements into Demeter-F programs Given an object o of class O, compute o.f(). Apply Polya's inventor paradox: Generalize the problem, solve the general problem and map back to the specific case. Which information in O is really needed to implement f()? Which information is noise. Which information in O is needed simultaneously? At which node should the information be brought together and computation be done on that information? How many traversals? What are the subtraversals? For each traversal: Type unifying or type preserving? Decompose into type unifying and type preserving traversals. Type unifying (e.g., computing the average, container capacity checking) What are the augmentors: which information is sent down? What information is sent up? Use n-tuple, n>1, if multiple results are needed. How is the information combined at each node? Can you use a generic combiner? What is the fold, what is the default value? Type preserving (e.g., copy an object with small changes, de Bruijn indices) What are the augmentors: which information is sent down? How is the information transformed? Which default builders need to be overridden?