Jess experts, hello! I am trying to use Jess on a Protege project - with the JessTab (interface between Jess code and Protege) sitting in between. As a matter of fact, I am trying to port some "ancient" code from CLIPS to Jess in an attempt to execute such code on the aforementioned Protege project.
Unfortunately, the old CLIPS code has several COOL-type statements that it uses to iterate over all instances of the Protege classes. I realize that Jess has no COOL-type support, and what I am trying to do, in effect is to mimic the COOL "do-for-all-instances" statement that will iterate over all class instances that satisfy a certain condition. Since my knowledge of CLIPS/Jess is fairly elementary, my best (and quite inefficient) idea would be to append all such instances of a particular class onto a multifield variable and then use a foreach statement in conjunction with an if statement to find all the instances I want. Is there a better way to do this, or is this the only workaround? Secondly, since I am using the JessTab, I use an intrinsic JessTab function (called mapclass) to convert all class instances to facts in the knowledge base. Is there a way to access these class instances so I can append them onto a multifield? Should I define a rule that performs this LOOK-AT-INSTANCES then APPEND-TO-MULTIFIELD operation and then run it separately before my rules for the main app get defined? Or is there a better way to do this? I have tried to be as specific in my query as possible. However, if this is somewhat vague, please let me know, I will furnish as much more information as possible. Thank you in advance for your time. Regards SAUMIL MEHTA -------------------------------------------------------------------- To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]' in the BODY of a message to [EMAIL PROTECTED], NOT to the list (use your own address!) List problems? Notify [EMAIL PROTECTED] --------------------------------------------------------------------
