if(breakpoints.contains(rule.getName())) setStepmode(true); if(!isStepmode() || RuleSystemExecutor.this.dostep) return !rulesystem.getAgenda().isEmpty() && !isStepmode();
/** * Create and open a rule engine tool frame. */ public static JFrame createRuleEngineFrame(RuleSystemExecutor exe, String title) { JComponent tabs = new RuleEnginePanel(exe.getRulesystem(), exe); JFrame f = new JFrame(title); f.getContentPane().setLayout(new BorderLayout()); f.add("Center", tabs); f.setSize(800,600); f.setLocation(SGUI.calculateMiddlePosition(f)); f.setVisible(true); f.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { System.exit(0); } }); return f; } }
/** * Start the example. */ public static void main(String[] args) { Rulebase rb = new Rulebase(); rb.addRule(createFindSolutionRuleJCL()); // rb.addRule(createFindSolutionRule()); IPatternMatcherFunctionality pf = new RetePatternMatcherFunctionality(rb); RuleSystem system = new RuleSystem(createState(), rb, pf); system.init(); RuleSystemExecutor exe = new RuleSystemExecutor(system, true); RuleEnginePanel.createRuleEngineFrame(exe, "Golfing Example"); } }
RuleSystemExecutor exe = new RuleSystemExecutor(rete, true); RuleEnginePanel.createRuleEngineFrame(exe, "Hanoi Rete Structure");
if(breakpoints.contains(rule.getName())) setStepmode(true); if(!isStepmode() || RuleSystemExecutor.this.dostep) return !rulesystem.getAgenda().isEmpty() && !isStepmode();
RuleSystemExecutor exe = new RuleSystemExecutor(rete, true); RuleEnginePanel.createRuleEngineFrame(exe, "HelloWorld");
RuleSystemExecutor exe = new RuleSystemExecutor(rete, true); RuleEnginePanel.createRuleEngineFrame(exe, "HelloWorld");
RuleSystemExecutor exe = new RuleSystemExecutor(rete, true); RuleEnginePanel.createRuleEngineFrame(exe, "Fibonacci");
RuleSystemExecutor exe = new RuleSystemExecutor(system, true); RuleEnginePanel.createRuleEngineFrame(exe, "Blocksworld Test"); IOAVState state = system.getState();
RuleSystemExecutor exe = new RuleSystemExecutor(rete, true); RuleEnginePanel.createRuleEngineFrame(exe, "Fibonacci");