aspect CachingTesting { ASTNode implements Caching.CacheRoot; public void ASTNode.propagate() { if(incremental || flushing) return; flushing = true; invalidate(); flushCaches(); flushing = false; } private int ASTNode.last_flushed = 0; public int ASTNode.getLastFlushed() { return last_flushed; } refine public void ASTNode.invalidate() { ++last_flushed; // patch to make sure that the refined method gets removed // this should eventually be fixed in the code generator if(false) refined(); } public boolean ASTNode.incremental(boolean flag) { boolean res = incremental; incremental = flag; return res; } }