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] Algernon - :count

Micheal Hewett mhewett at
Tue Mar 27 09:22:29 PDT 2007

Your rule will fire when the name of an instance of Box changes
and (maybe) when an instance of Box is created. 
The first step is to verify that the rule actually fires.  You could
do that by putting a :PRINTLN statement after the :NAME statement.

Second, turn on tracing (:TRACE :VERBOSE) and you can
watch the rule firing to see what is going wrong.  Remember that
Algernon error messages are printed to the console, not to the
Algernon Tab window.   You can also trace specific rules.

Tracing usually prints enough information to tell what is going wrong.
The next level of tracing (:TRACE :DETAIL) will give you a little
more information.  Use (:TRACE :NORMAL) to return to normal


p.s.  You also said that a Box has an "Items" slot but in the rule
        you call it "Item".

Robert Dave wrote:
> Hi, 
> I would like to use in Algernon a rule which counts the number of items in a
> multiple slot and them write the number in a integer slot. I tried the following
> code, but it doesn't work :
> (tell ((:add-rule Box
>          ((:Name ?c ?f)(:count ?num ?p (Items ?c ?p))
>        -> (Number_of_Items ?c ?num)
>          )
> ))) 
> Box has two slots : Item (multiple) and Number_of_Items (single)
> Thx in advance,
> Robert.
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at
> Instructions for unsubscribing: 

More information about the protege-discussion mailing list