Re: JESS: ppdefrule doesn't make sense - is this a Jess 6.1 bug?

2006-01-19 Thread ejfried
I think Hector Urroz wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
 Thanks for the response. It does seem a bit odd to automatically and
 silently modify code. Why not throw an exception? Is this done elsewhere in
 Jess? What is the rationale? Did I stumble onto a reserved rule name?
 

Some rules get transformed in various ways as they are compiled -- for
example, | connectives are actually transformed into or function
calls, and ppdefrule will show them that way. And Jess inserts an
initial-fact pattern in various situations; this is described in the
manual. But I think this is only case where Jess inserts a pattern
than matches a user template. As I recall, it was done for defensive
reasons: because if Jess doesn't insert that pattern, then if people
don't include it themselves (which is the right thing to do 99.99% of
the time) there will be extra, spurious firings of the need-X rules,
and I got tired of explaining why they were happening.


-
Ernest Friedman-Hill  
Advanced Software Research  Phone: (925) 294-2154
Sandia National LabsFAX:   (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov


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]




Re: JESS: ppdefrule doesn't make sense - is this a Jess 6.1 bug?

2006-01-18 Thread ejfried
I think Hector Urroz wrote:
 
 Jess (ppdefrule MAIN::clear-need-answer)
 (defrule MAIN::clear-need-answer
\Clear need-answer if question has been answered\
?r - (MAIN::need-answer (ident ?id))
(not (MAIN::answer (ident ?id)))
(MAIN::answer (ident ?id))
=
(printout t \Retracting need-answer for question: \ ?id crlf)
(retract ?r))
 
 ... where does the not come from?


It's really there: it is inserted automatically when the rule is being
compiled. Resist your urge to clean up the need-answer facts;
they're not hurting anything and they help Jess keep track of what
it's doing.

-
Ernest Friedman-Hill  
Advanced Software Research  Phone: (925) 294-2154
Sandia National LabsFAX:   (925) 294-2234
PO Box 969, MS 9012 [EMAIL PROTECTED]
Livermore, CA 94550 http://herzberg.ca.sandia.gov


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]




Re: JESS: ppdefrule doesn't make sense - is this a Jess 6.1 bug?

2006-01-18 Thread Hector Urroz
Thanks for the response. It does seem a bit odd to automatically and
silently modify code. Why not throw an exception? Is this done elsewhere in
Jess? What is the rationale? Did I stumble onto a reserved rule name?

Thanks again,

Hector

On 1/18/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 I think Hector Urroz wrote:
 
  Jess (ppdefrule MAIN::clear-need-answer)
  (defrule MAIN::clear-need-answer
 \Clear need-answer if question has been answered\
 ?r - (MAIN::need-answer (ident ?id))
 (not (MAIN::answer (ident ?id)))
 (MAIN::answer (ident ?id))
 =
 (printout t \Retracting need-answer for question: \ ?id crlf)
 (retract ?r))
 
  ... where does the not come from?


 It's really there: it is inserted automatically when the rule is being
 compiled. Resist your urge to clean up the need-answer facts;
 they're not hurting anything and they help Jess keep track of what
 it's doing.

 -
 Ernest Friedman-Hill
 Advanced Software Research  Phone: (925) 294-2154
 Sandia National LabsFAX:   (925) 294-2234
 PO Box 969, MS 9012 [EMAIL PROTECTED]
 Livermore, CA 94550 http://herzberg.ca.sandia.gov

 
 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]