Hello all,

What's better (of course this is a fictitious example):

(defrule a
        (person (name ?n) (id ?I) ... (address ?a))
        (test (or (eq ?n "John") (eq ?I 123) ... (address ?a "B street"))
*
(assert sth))

or to break it into several rules without "or"? Please take into account
that the fact "person" is only asserted once.

My guess is that in efficiency they are equivalent, since the predicates
will be evaluated until one of them is reached, but the second form is more
maintainable. Am I right?

TIA

Fred Freitas
----------------------------------------------------
PhD student - Artificial Intelligence & Internet
Federal University of Santa Catarina - UFSC



---------------------------------------------------------------------
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]
---------------------------------------------------------------------

Reply via email to