public static void main(String args[]) { Logger.init( new LoggerImp() { @Override public void log(String s) { System.out.println(s); } }); DriverOption option = new DriverOption(); option.fillFromEnvironmentVariables(); Driver<TransitionInfo> controller = Driver.connectToDevice(option, ".*", 13337, TransitionInfo.class); if (controller == null) throw new RuntimeException("Cannot initiate driver"); ExplorerImp explorer = new ExplorerImp(controller); if (!explorer.init()) throw new RuntimeException("Cannot initialize teacher"); CSet<ICommand> initialPalette = controller.getCurrentView().getRepresentativePoints(TouchFactory.getInstance()); TreeLearner foo = new TreeLearner(initialPalette); explorer.setGuide(foo); Guide<ICommand, Observation> learner = foo; // = new PaletteLearnerImp(teacher); Exploring<ICommand, Observation> learning = new Exploring<ICommand, Observation>(learner, explorer); learning.run(); }
private static void prepare(Activity defaultActivity) { if (skipmode()) return; // If this is first execution of application, // initialize supervisor Logger.init(logger); if (supervisor == null) { supervisor = new SupervisorImp(); supervisor.prepare(defaultActivity); } clearData(); }
public static void logUnroll(int fid) { if (skipmode()) return; supervisor.logUnroll(fid); Logger.log("UNROLL: " + fid); }
public static void logReturn(int fid) { if (skipmode()) return; supervisor.logReturn(fid); Logger.log("RETURN: " + fid); }
public static void logCall(int fid) { if (skipmode()) return; supervisor.logCall(fid); Logger.log("CALL: " + fid); }
public static void logExit(int fid) { if (skipmode()) return; supervisor.logExit(fid); Logger.log("EXIT: " + fid); }
public static void logEnter(int fid) { if (skipmode()) return; supervisor.logEnter(fid); Logger.log("ENTER: " + fid); }
public static void start() { if (skipmode()) return; Logger.log("Supervisor Start"); supervisor.start(); }
public static void logStopExit(Activity a) { if (skipmode()) return; Logger.log("Activity(" + a.toString() + ") is Stoped"); supervisor.logStopExit(a); }