Hi John: I think they need an example like this. Please can you weave this into your presentation. -- Karl The code is in: /proj/adaptive2/course/com1205/w02/project-prep/testing Example input: Java: class Basket { Fruit f; Pencil p; } class Fruit { Weight w;} class Orange extends Fruit { Color c; } class Pencil {} class Color { String s; } class Weight{ int i; } class Main { static public void main(String args[]) throws Exception { } } T: aspect Traversals { declare traversal t1 = Basket to *; declare traversal t2 = Basket to Weight; } output: aspect TraveralsImplementation { void Basket.t1(){ if (f != null) t1_f(); if (p != null) t1_p();} void Basket.t1_f(){f.t1();} void Basket.t1_p(){p.t1();} void Fruit.t1(){t1_w();} void Fruit.t1_w(){w.t1();} void Orange.t1(){t1_c(); super.t1();} void Orange.t1_c(){c.t1();} void Pencil.t1(){}; void Color.t1(){}; void Weight.t1(){}; void Basket.t2(){t2_f();} void Basket.t2_f(){f.t2();} void Fruit.t2(){t2_w();} void Fruit.t2_w(){w.t2();} void Orange.t2(){super.t2();} void Weight.t2(){}; } aspect TraversalsTest { pointcut mainCall() : call(void main(..)); before() : mainCall() { // create Basket b Basket b = new Basket(); b.f = new Orange(); b.t1(); b.t2(); pointcut nodeTraversals(Object o): call(void t1()) && target(o); pointcut edgeTraversals(Object s, Object t): withincode(void t1_*(..)) && call(void t1()) && this(s) && target(t); before(Object o) : nodeTraversals(o) { System.out.println("traversing node " + o); } before(Object s, Object t) : edgeTraversals(s, t) { System.out.println( "traversing edge: source= " + s + " target= " + t); System.out.println(thisJoinPoint); } // same but replace t1 by t2 } The project consists of the following steps: 1. Produce the class graph cg from the Java program. 2. For cg and a fixed traversal strategy produce the traversal graph. 2.1. Generate the traversal graph for each strategy appearing in T.