core: import edu.neu.ccs.demeter.dj.*; import java.lang.*; import java.util.*; import edu.neu.ccs.demeter.*; add: class Main { public constructor Main() {{ super(); }} public static Main parse(java.io.Reader in) throws ParseException {{ return new Parser(in)._Main(); }} public static Main parse(java.io.InputStream in) throws ParseException {{ return new Parser(in)._Main(); }} public static Main parse(String s) {{ try { return parse(new java.io.StringReader(s)); } catch (ParseException e) { throw new RuntimeException(e.toString()); } }} {{ public static ClassGraph cg1; public static ClassGraph cgT; public static ClassGraph cgP; public static Cd_graph m; public static void main(String args[]) throws Exception { m = Cd_graph.parse(System.in); cgT = new ClassGraph(true,false); cg1 = new MyClassGraph(Main.cgT, "from Cd_graph bypassing {->*,myparent,* , ->*,parents,* , ->*,tail,*} to *"); cgP = new MyClassGraph(Main.cgT, "from Cd_graph bypassing {->*,tail,*} to *"); //m.display(); // Assignning parents to all classes m.setAllParents(); // Single Inheritance Check m.singleInher(); // Inheritance Cycle Check if (m.doInherCycle()) { m.inherCycle(); if (m.get_cycle_pass()) { // Flattening the Cd_graph object m.flatten(); // Then do unique parts check m.uniqueParts(); } else System.out.println("Fix the Inheritance Cyle before proceeding to Flattening and Unique Parts Check"); } else System.out.println("Fix the multiple inheritance before proceeding to Inheritance Cycle Check"); //undefined classes check m.undefinedClasses(); // Terminal Buffer Rule m.bufferRule(); System.out.println(); //System.out.println(cg1); } }} {{ void universal_trv0_bef(UniversalVisitor _v_) { ((UniversalVisitor) _v_).before(this); } }} {{ void universal_trv0_aft(UniversalVisitor _v_) { ((UniversalVisitor) _v_).after(this); } }} {{ void universal_trv0(UniversalVisitor _v_) { universal_trv0_bef(_v_); universal_trv0_aft(_v_); } }} }