One way to interpret this is that
rule 2 adds additional constraints that rule 1 does not have.
As you say, you could envision a family of rules like this,
activated under similar, but not identical circumstances.
But this would also mean that rule 1, would be activated any time
rule 2 was activated--and under certain circumstances, you may
want rule 1 NOT to be activated if rule 2 is.
I'm not sure how you'd prevent that without additional extensions
to the engine, off the top of my head, though.
<*> -----Original Message-----
<*> From: [EMAIL PROTECTED]
<*> [mailto:[EMAIL PROTECTED]]
<*> Sent: Saturday, September 22, 2001 2:15 PM
<*> To: Jess Mailing List
<*> Subject: JESS: Some Ideas for Jess 6.1 ...
<*>
<*>
<*>
<*> Someone posted a question recently about "calling one rule from
<*> another," an interesting idea that doesn't hold up too well to
<*> scrutiny (how does the rule compiler determine if it's OK
<*> to pass the
<*> facts that matched one rule on to another rule as
<*> arguments?) But it's
<*> made me think of a related concept: one rule could -extend-
<*> another. Imagine something like
<*>
<*> (defrule rule-1
<*> (a b c)
<*> =>
<*> (do-something))
<*>
<*> (defrule rule-2 extends rule-1
<*> (d e f)
<*> =>
<*> (do-something-else))
<*>
<*> What would this syntax mean? My idea is that it means that rule-2 is
<*> equivalent to
<*>
<*> (defrule rule-3
<*> (a b c)
<*> (d e f)
<*> =>
<*> (do-something)
<*> (do-something-else))
<*>
<*> but there are other possible interpretations. Anyone care to comment
<*> on this? This seems like a really useful way to express the idea of
<*> having a family of rules that are all activated under
<*> similar, but not
<*> necessarily identical, circumstances.
<*>
<*> ---------------------------------------------------------
<*> Ernest Friedman-Hill
<*> Distributed Systems Research Phone: (925) 294-2154
<*> Sandia National Labs FAX: (925) 294-2234
<*> Org. 8920, MS 9012 [EMAIL PROTECTED]
<*> PO Box 969 http://herzberg.ca.sandia.gov
<*> Livermore, CA 94550
<*>
<*> ------------------------------------------------------------
<*> ---------
<*> 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]
<*> ------------------------------------------------------------
<*> ---------
<*>
---------------------------------------------------------------------
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]
---------------------------------------------------------------------