Interrupt extends AbstractRhsFunctionHandler { public Interrupt(DecisionCycle decisionCycle) { super("interrupt", 0, 0); Arguments.checkNotNull(decisionCycle, "decisionCycle"); this.decisionCycle = decisionCycle; } Interrupt(DecisionCycle decisionCycle); @Override Symbol execute(RhsFunctionContext rhsContext, List<Symbol> arguments); @Override boolean mayBeStandalone(); @Override boolean mayBeValue();  }
@Test(timeout=3000) public void testInterrupt() throws Exception { new CycleCountInput(agent.getInputOutput()); agent.getProperties().set(SoarProperties.WAITSNC, true); this.agent.getProductions().loadProduction("testInterrupt (state <s> ^superstate nil ^io.input-link.cycle-count 45) --> (interrupt)"); this.agent.runForever(); assertEquals("*** Interrupt from production testInterrupt ***", this.agent.getReasonForStop()); assertEquals(45, agent.getProperties().get(SoarProperties.D_CYCLE_COUNT).intValue()); }