Some of this is OK, some of it is not!
1) Your "q1" is definitely an error. Jess doesn't allow quoted
strings as rule names.
2) Your "q2" is actually marking a correct use of the new "Java
pattern" syntax introduced in Jess 7. It would be appropriate for an
unordered template CreditScore with slots ProgramGroup and linkType .
2a) The line after your "q2" is an *incorrect* use of the new syntax;
the variable "cs" can't be used that way.
3) An obvious error; they presumably mean something like
(modify ?cs (score (- ?score 3)))
although "?score" is unbound.
On May 30, 2007, at 4:29 PM, Radu Razvan Slavescu wrote:
Hello,
I'm reading a paper on Jess and the following code is given:
(defrule "rule 1" ; q1
?cs <- (CreditScore {ProgramGroup == "PG" &&
linkType == "Lt"}) ;;q2
?cs <- (CreditScore{cs >= 100})
=>
(modify ?cs (score (- (score 3)))) ; q3
)
Even if not told, CreditScore seems to be an unordered fact. I
found no
such a syntax either on the book "Jess in action" or on the Jess
web site
--------------------------------------------------------------------
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 owner-jess-
[EMAIL PROTECTED]
--------------------------------------------------------------------
---------------------------------------------------------
Ernest Friedman-Hill
Advanced Software Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
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]
--------------------------------------------------------------------