The abstract rule is more interesting. I still think it could
have some complications. The variable issue still exists (variables
in the abstract rule and in the concrete rules with the same name).
Things like the order of patterns on the LHS and actions on the RHS
might be problematic since in some cases it might be necessary to
reorder things. Perhaps what one might consider is a 'macro'
facility that lets you define macro defintions with parameters
that can represent patterns or actions and provide the sort of
sharing of common 'code' in rules that would be useful.
eg. (defmacro my-patterns ()
(a b c)
(x y)
)
then
(defrule my-rule
(z p q)
(my-patterns) or (macro (my-patterns) or (#my-patterns)
=>
...
)
Syntax here is a bit of a problem (for the macro definition
and the 'calling' of the macro). I'm not sure I like
this idea ...
Anyhow, we're just throwing ideas into the wind at this
stage.
Bob.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 22, 2001 8:56 PM
To: Orchard, Bob
Cc: Jess Mailing List
Subject: Re: JESS: Some Ideas for Jess 6.1 ...
I think Orchard, Bob wrote:
>
> 2. another problem is that one starts trying to think about things
> like: should only rule 2 fire if (a b c) and (d e f)
> exist. Well in general this is impossible to enforce.
> Rules fire (or at least go on the agenda with a chance to
> be fired) when their patterns match. The facts don't
> always appear at the 'same time' in many systems. So in general
> you can't hold rule-1 from firing when (a b c) is asserted. How
> do you decide how long to wait? If the facts (a b c) and (d e f)
> are asserted at the same time should you get different behaviour
> than if they are asserted 2 minutes apart. Why? How to explain this
> to users?
I actually had the thought that there could also be -abstract- rules,
which would never be placed on the agenda; defqueries are already a
kind of "abstract rule." I don't know if this is just too cute, or if
it's a useful idea. Anyway, abstract rules would serve as "base rules"
for a family of other rules that extended them. Therefore they would
allow you to create the rule-2-only behaviour.
---------------------------------------------------------
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]
---------------------------------------------------------------------