Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] Add instances to multislot

Thane Hall thane.hall at thales-fres.co.uk
Tue Mar 27 03:07:55 PDT 2007


Thanks Samson - You're a star!

I made the changes you recommended and that overcame the problem. I then hit a 
couple of others but was able to work my way through them. The first was that 
the rule fell into the infinite-loop trap. Unfortunately "(declare (no-loop 
TRUE))" failed to work because the linksToSR multislot could contain references 
to many ?s objects. Instead I removed the no-loop declaration and used a 
test "(test (not (member$ ?s ?lsr)))" as a way of ensuring that rules weren't 
fired a second time.

The final version of the rule was:

(defrule MAIN::find_matching_instances 
   (object (is-a Link_Table) (U_Trial ?m) (S_Trial ?n)) 
   (object (OBJECT ?u) (Object_Id ?m) (linksToSR $?lsr)) 
   (object (OBJECT ?s) (ID ?n)) 
   (test (not (member$ ?s ?lsr))) 
   => 
   (slot-insert$ ?u linksToSR 1 ?s))


Thanks again,
Thane





More information about the protege-discussion mailing list