// ... def compile(fileName: String, classDir: String): Unit = { // ... // Adapt this to your class hierarchy and add it after the type checking code. // You can also comment out the class files generation for this lab to save some time. mainProg.classes.foreach(ct => { ct.methods.foreach(m => { val cfg = controlflow.ASTtoCFG.convertAST(m) cfg.writeDottyToFile(ct.getSymbol.name + "-" + m.getSymbol.name + ".dot") }) }) // ... } // ...