class Target {public: void f() { // do something }}; class Target {public: void f() { // do something }}; Target.h Target.h #include “Target.h“ // for last_#include <stdio.h> // for sliceaspect Problem { Target *last_; advice “Target“: slice class { void dump () { // print object, needs stdio } }; advice execution(“Target“) : after () { last_ = tjp->that(); last_->dump(); }}; #include “Target.h“ // for last_#include <stdio.h> // for sliceaspect Problem { Target *last_; advice “Target“: slice class { void dump () { // print object, needs stdio } }; advice execution(“Target“) : after () { last_ = tjp->that(); last_->dump(); }}; Problem.ah Problem.ah source code weaving (ac++) #include “Target.h“ // for last_#include <stdio.h> // for sliceclass Problem { Target *last_; void transformed advice { // needs Target, thus Target.h }}; #include “Target.h“ // for last_#include <stdio.h> // for sliceclass Problem { Target *last_; void transformed advice { // needs Target, thus Target.h }}; Problem.ah Problem.ah woven code #include “Problem.ah“class Target { void transformed dump { // needs stdio }public: void transformed f { // do something }}; #include “Problem.ah“class Target { void transformed dump { // needs stdio }public: void transformed f { // do something }}; Target.h Target.h include cycle! generated include (needed for the slice, which depends on stdio.h) include include