JESS: Accumulate Function - LHS

2005-12-02 Thread Roger Studner
Are there situations or usages of (accumulate) that would actually prevent a rule from firing?     ?c <- (accumulate (bind ?count 0)    ;; initializer             (bind ?count (+ ?count 1))    ;; action             ?count     (pattern to look for.. sing

RE: JESS: Accumulate Function - LHS

2005-12-02 Thread Tromm, Martijn
Yes, that's how you can sweep a lot of data of different type together in one rule. The rule still fires of some types are not present.   Martijn   From: Roger Studner [mailto:[EMAIL PROTECTED] Sent: vrijdag 2 december 2005 13:19 To: jess-users@sandia.gov Subject: JESS: Accumul

Re: JESS: Accumulate Function - LHS

2005-12-02 Thread ejfried
All pattern-matching has to be driven by *some* change to working memory. A few CEs (not, test, accumulate) can pass when they match no facts at all. Therefore, these CEs need a little help to know when to fire. If any of them appear first on the LHS of a rule, Jess inserts a pattern "(initial-fact

JESS: Bug

2005-12-02 Thread Yura
JessDE doesn't accept "slot-specific" declarations. Yuri 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 probl

Re: JESS: Accumulate Function - LHS

2005-12-02 Thread Roger Studner
Interesting.. I definately am finding cases where I have rules that have all their conditions met on the LHS.. there is NOTHING for the accumulate part to match on.. and the rule doesn't fire heh. I'll try to find a concrete example with some facts I can display etc.  Basically if I add 'junk' to

Re: JESS: Bug

2005-12-02 Thread ejfried
An example, please? I just tried it myself and (as I expected) not only does it not flag them as an error, it auto-completes them. I think Yura wrote: > JessDE doesn't accept "slot-specific" declarations. > - Ernest Friedman-Hill Advanc

Re: JESS: Accumulate Function - LHS

2005-12-02 Thread Roger Studner
This rule fires: (defrule count-icd9-codes-in-a-group-for-zip (declare (salience 5)) (granularity (gran "ZIP")) (ICD9_COUNTING_GROUP (id ?id) (codes $?codes)) ?factV <- (ICD9_CODE (ICD91 ?code)) (test (neq (member$ ?factV $?codes) FALSE)) (analysis_wi

JESS: Possible bug: using apply with str-cat inside a function

2005-12-02 Thread Steve Solomon
If you call apply with str-cat outside of a function, the result is what you would expect: a single string that is the argument strings concatenated.   Jess> (apply str-cat “foo” “ bar” “ baz”) “foo bar baz”   If you declare a function that performs the concatenation on its single mult

JESS: Bug?

2005-12-02 Thread Yura
Well say I have this rule (defrule rule (declare ) =>) When I type "(" inside "(declare)" I receive auto-loop, no-focus,node-index-hash and salience. After manually inserting "slot-specific" I receive error. I'm using Jess70b4, my Eclipse is 3.1.1. At any rate I'd like to ask a more serious ques

Re: JESS: Possible bug: using apply with str-cat inside a function

2005-12-02 Thread ejfried
Jess's "apply" differs from the classic Lisp "apply" in that the varargs are in the "apply" funcall, rather than being bundled up in a list. This is by accident rather than by design, I'm afraid. In classic Lisp, this form (apply str-cat "foo" " bar" " baz") is an error, but in Jess, it's correct

Re: JESS: Bug?

2005-12-02 Thread ejfried
I think Yura wrote: > (defrule rule (declare ) =>) > > When I type "(" inside "(declare)" I receive auto-loop, > no-focus,node-index-hash and salience. After manually inserting > "slot-specific" I receive error. I'm using Jess70b4, my Eclipse is 3.1.1. Ah. OK. That's because slot-specific applies

JESS: Re: Bug

2005-12-02 Thread Yura
I'm sorry - it's there in the manual. I should be more attentive. Yuri 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 addres

Re: JESS: Re: Bug

2005-12-02 Thread ejfried
I think Yura wrote: > I'm sorry - it's there in the manual. I should be more attentive. By my calculation, you've reported 4 bugs, and 3 of them were real -- so you're batting .750 . Seems like an excellent average to me! - Ernest Friedman