I'm using constructs-to-c
command in top-level to convert my constructs to c code. Till the moment I know how to use these source files as black boxes. I think in these files, CLIPS implement the RETE algorithm, right? I'd like to know how can I understand the name convention and the contents of these files? I found no explanation to this in the reference manuals.
This is the only explanation I found to this point but I didn't understand a lot from the second point. I have a good understanding of RETE algorithm, though.
Also is there someway to visualize the RETE network CLIPS creates for my constructs?
Thanks
Asked
Active
Viewed 88 times
0

Salahuddin
- 1,617
- 3
- 23
- 37
1 Answers
0
The constructs-to-c generated files are just a dump of the C data structures used to represent the CLIPS constructs, so they're not a representation of the rete algorithm but rather the data that the algorithm operates on. The naming convention used by the arrays in the generated files is designed to keep the pointer references from one array to another short and distinct--not to make them easy to read. To visualize the network you need to manually draw out the connections yourself. I'd say it's easier to do that by adding simple/single rules to CLIPS and step through the code with a debugger to see how asserts and retracts are processed.

Gary Riley
- 10,130
- 2
- 19
- 34
-
Thanks Gray for your answer. So how can I understand how CLIPS implements RETE algorithm? I mean alpha and beta networks (nodes and memories)? I mean how does CLIPS really implement this in code. What is the starting point to understand this? – Salahuddin Jun 15 '17 at 20:19
-
There's a few high level slides here on some implementation details: https://sourceforge.net/projects/clipsrules/files/CLIPS/Misc/CLIPS_Implementation_of_Rete.pdf/download. Stepping through the code with a debugger is the best way to observe the details of the implementation. – Gary Riley Jun 15 '17 at 21:04
-
Great. This is what I was looking for. Thanks Gary – Salahuddin Jun 15 '17 at 21:44