0
votes

I am using CLIPS 6.4 IDE for debugging purposes. I started developing my expert system based on "salience" property of rules, to change rules priority.

I think that the best practice is to change this behaviors and move rules with different "salience" level to different named modules.

When I use "salience" I can easily debug my program by using IDE (i.e. reset, run and step buttons).

In "Fact Browser" it is possible to see all currently active facts, but when i use named modules I can see nothing (see picture below):

facts browser

On the other hand "Agenda browser" works pretty good:

agenda browser

So debugging application without seeing currently active facts is troublesome, is it possible to fix it?

P.S.: I am running CLIPS IDE 6.4 on Windows 10 , x64 Thank you!

1
It's a bug. Until it's fixed, you can work around it by either opening the debug window before you issue the reset command or issuing another reset to restart the program if the debug window is already open.Gary Riley
I dont know why, but your approach does not work for me. Tried resetting after the debug window is alreay open, tried to open debug window before the reset command was issued, but still this window shows nothing :(Sergei Yendiyarov
You didn't include any code to reproduce the problem, so I could only test with an example I created that had a similar issue.Gary Riley
Yes, you are right. I will be back with a code sample when I have more time. ThanksSergei Yendiyarov

1 Answers

1
votes

Here's example code that doesn't properly display the facts:

(defmodule MAIN (export ?ALL))
(deftemplate point (slot x) (slot y))
(deffacts points (point (x 1) (y 2)) (point (x 3) (y 4)))
(defmodule ENTITIES)
(defmodule PLANNING (import MAIN ?ALL))

Here's example code that does:

(defmodule MAIN (export ?ALL))
(deftemplate point (slot x) (slot y))
(deffacts points (point (x 1) (y 2)) (point (x 3) (y 4)))
(defmodule ENTITIES (import MAIN ?ALL))
(defmodule PLANNING)

The starting index of the selected module is incorrectly set to 1 rather than 0, so in the case where the module associated with that index does not have any facts in scope, the browser does not correctly display facts when other modules are selected.

You can correct this issue by deleting the initial setting for the SelectedIndex in the EntityBrowser.xaml file. These lines:

<DataGrid x:Name="moduleDataGridView" ... SelectedIndex="1" ...>

<DataGrid x:Name="entityDataGridView" ... SelectedIndex="1" ...>

<DataGrid x:Name="slotDataGridView" ... SelectedIndex="1" ...>

should be changed to

<DataGrid x:Name="moduleDataGridView" ... ...>

<DataGrid x:Name="entityDataGridView" ... ...>

<DataGrid x:Name="slotDataGridView" ... ...>