I think that text is referring to dotted variables used to access
properties of Java objects, as opposed to slot values of facts.
On Jun 29, 2010, at 10:09 AM, Henrique Lopes Cardoso wrote:
Thanks for the clarification.
By the way, in section 3.7.1 of the Jess manual: "You can use dotted
variables in any procedural code, but they won't generally work in the
pattern matching parts of a rule."
Does this mean that the use of dot notation is discouraged in the
LHS of
rules? Section 6.2.1 seems to provide an example where it is used in
the
LHS, although with a Java pattern.
Henrique
Ernest Friedman-Hill wrote:
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
y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov
.
--------------------------------------------------------------------
---------------------------------------------------------
Ernest Friedman-Hill
Informatics & Decision Sciences Phone: (925) 294-2154
Sandia National Labs
PO Box 969, MS 9012 ejfr...@sandia.gov
Livermore, CA 94550 http://www.jessrules.com
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users y...@address.com'
in the BODY of a message to majord...@sandia.gov, NOT to the list
(use your own address!) List problems? Notify owner-jess-us...@sandia.gov.
--------------------------------------------------------------------