* @param args the arguments from the command line to the DBBC test program
* @throws Exception
*/
public void run(String[] args) throws Exception {
Printer printer = Printer.STDOUT;
PrettyPrinter pp = new PrettyPrinter(printer);
Program p = Main.loadProgram(args);
DBBC dbbc = new DBBC(p, options);
ControlFlowGraph cfg = p.getCFG();
Iterator i = cfg.getSortedBlockIterator();
while (i.hasNext()) {
ControlFlowGraph.Block b = (ControlFlowGraph.Block)i.next();
printer.startblock("block starting at: " + StringUtil.addrToString(b.getAddress()));
DBBC.CodeBlock code = dbbc.getCodeBlock(b.getAddress());
if (code != null) {
printer.println("// worst case execution time = " + code.wcet + " cycles");
pp.visitStmtList(code.stmts);
} else {
printer.println("// no code generated for this block");
}
printer.endblock();
}