Automata3Tool { public static void main(String[] args) throws IOException { Log.ensureInitalization(); if (args.length != 1) { Log.error("0xEE741 Please specify only one single path to the input model."); return; } Log.info("Automata3 DSL Tool", "Automata3Tool"); Log.info("------------------", "Automata3Tool"); String model = args[0]; ASTAutomaton ast = parse(model); Log.info(model + " parsed successfully!", "Automata3Tool"); Log.info("=== 4: Automata3PP ===============", "Automata3Tool"); IndentPrinter ppi = new IndentPrinter(); Automata3PrettyPrinter acpp = new Automata3PrettyPrinter(ppi); ast.accept(acpp); Log.info("Pretty printing into console:", "Automata3Tool"); Log.println(ppi.getContent()); }  static void main(String[] args); static ASTAutomaton parse(String model);  }
@Test public void executePingPong() throws IOException { Automata3Tool.main(new String[] { "src/test/resources/example/PingPongInv.aut" }); Log.printFindings(); assertEquals(0, Log.getFindings().size()); List<String> p = LogStub.getPrints(); assertEquals(6, p.size()); assertTrue(p.get(0), p.get(0).matches(".*.INFO. Automata3Tool Automata3 DSL Tool.*\n")); String res = p.get(p.size()-1).replaceAll("[\r\n]", " "); assertEquals(395, res.length()); assertTrue(res, res.matches(".*print by composed Automata3PrettyPrinter.*")); assertTrue(res, res.matches(".*state NoGame /.../ true /.../ <<initial>>.*")); assertTrue(res, res.matches(".*Pong - returnBall > Ping;.*")); }
@Test public void executeSimple12() throws IOException { Automata3Tool.main(new String[] { "src/test/resources/example/Simple12Inv.aut" }); Log.printFindings(); assertEquals(0, Log.getFindings().size()); List<String> p = LogStub.getPrints(); assertEquals(6, p.size()); }