public void stepForward() {
   try {
     interpreter.resume();
     interpreter.runCycle();
     interpreter.suspend();
   } catch (WrappedException ex) {
     handleWrappedException(ex);
   }
 }
 public void start() {
   try {
     interpreter.enter();
   } catch (WrappedException ex) {
     handleWrappedException(ex);
   }
 }
 protected void runCycle() {
   try {
     interpreter.runCycle();
   } catch (WrappedException ex) {
     handleWrappedException(ex);
   }
 }
 @Override
 public void init() {
   ExecutionFlow flow = sequencer.transform(statechart);
   if (!context.isSnapshot()) {
     contextInitializer.initialize(context, flow);
   }
   interpreter.initialize(flow, context);
 }
 private void handleWrappedException(WrappedException ex) {
   Status errorStatus =
       new Status(
           Status.ERROR,
           Activator.PLUGIN_ID,
           ERROR_DURING_SIMULATION,
           ex.getCause().getMessage(),
           ex.getCause());
   IStatusHandler statusHandler = DebugPlugin.getDefault().getStatusHandler(errorStatus);
   try {
     statusHandler.handleStatus(errorStatus, getDebugTarget());
     interpreter.suspend();
     interpreter.tearDown();
   } catch (CoreException e) {
     e.printStackTrace();
   }
 }
 public void resume() {
   try {
     suspended = false;
     interpreter.resume();
   } catch (WrappedException ex) {
     handleWrappedException(ex);
   }
 }
 public void terminate() {
   terminated = true;
   interpreter.tearDown();
 }