Main { {{ static ClassGraph cg; public static void main(String args[]) throws Exception { cg = new ClassGraph(true, false); Start e = Start.parse(System.in); System.out.println(); System.out.println("output of Display hyperslice ------------------"); e.display(); System.out.println(); System.out.println("output of Print hyperslice ------------------"); e.print(); System.out.println(); System.out.println("output of Check hyperslice ------------------"); e.check(); System.out.println(); System.out.println("done"); } }} } // Display hyperslice: concern: external representation: canonical Start { void display () to * (DisplayVisitor); } // Print hyperslice: concern: external representation: application specific // representation determined by the class dictionary Start { void print () to * (PrintVisitor); } // Check hyperslice: concern: semantic checking Start { {{ void check() { Main.cg.traverse(this, "from Start to Compound", new Visitor(){ public void start(){ System.out.println(" start checking "); } public void before(Compound host){ System.out.println("size of argument list " + host.get_exp_list().size()); } public void finish(){ System.out.println(" finish checking "); } }); }; }} }