On Jun 29, 2010, at 6:42 AM, Henrique Lopes Cardoso wrote:
Does this mean that when using dotted variables a pattern binding
should
always be included before they are used?
This isn't really limited to dotted variables; you'd see the same
issue if you wrote the code using fact-slot-value, or reflection. For
a match to be made or unmade, the particular Rete node that performs
the test needs to be notified that the relevant fact(s) have changed.
That won't happen unless those relevant facts are explicitly matched
by patterns. If the facts are dynamic -- i.e., if the slot values will
change at runtime -- then I'd prefer to write this rule as
(defrule r2
(a (b ?b))
?b <- (b (s ?s))
(c (s ?s))
=>
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences, Sandia National Laboratories
PO Box 969, MS 9012, Livermore, CA 94550
http://www.jessrules.com
--------------------------------------------------------------------
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].
--------------------------------------------------------------------