Cd_graph { traversal goToAll(ExplorationVisitor e) { to *; } } ExplorationVisitor { before {Vertex,Adj} (@ System.out.println("Entering " + host.getClass().toString()); this.set_total(new Integer( total.intValue() + 1)) ; @) after {Vertex,Adj} (@ System.out.println("Leaving " + host.getClass().toString()); @) } Main { (@ static public void main(String args[]) throws Exception { Cd_graph graph = Cd_graph.parse(System.in); ExplorationVisitor e = ExplorationVisitor.parse("0"); graph.goToAll(e); int result = e.get_total().intValue(); System.out.println("result = " + result ); if(result == 11) { System.out.println("SUCCESS"); } else { System.out.println("FAILURE"); } System.out.println("done"); } @) }