Hi,
just to report that the following problem is still an issue:
>Christophe,
>
>I can see why this is happening, and I will address it in the 6.1a2
>release.
>
>I think Christophe Ponsard wrote:
>>
>> >> I am experiencing retraction of logically derived facts after the
>> >> addition of a new rule
>>
>>
>
Please find a relevant testing script in attachement
Note it is not really important for me as I found a workaround
but you still may consider to fix it in some future.
Thanks again for your ongoing effort to improve Jess !
Christophe P.
-----------------------------------------------------
PONSARD Christophe (UCL/FSA/INGI)
Place Sainte Barbe 2, 1348 Louvain-la-Neuve (Belgium)
tel. : ++32 10 47 90 12 email:[EMAIL PROTECTED]
WWW : http://www.info.ucl.ac.be/~chp
-----------------------------------------------------
// test for retraction behavior on logically asserted facts
// [EMAIL PROTECTED] - March 2002
; uncomment following to see retraction
;(watch all)
(deftemplate inc (slot cpt) (slot in))
(deftemplate in extends inc)
(deftemplate top (slot cpt))
(deffacts f1
(in (cpt chp) (in Staff))
(in (cpt Staff) (in Person))
(in (cpt Person) (in Thing))
)
;(deffacts f1
; (in (cpt lw) (in Staff))
; (in (cpt Staff) (in Person))
; (in (cpt Person) (in Thing))
;)
(defrule inc-closure
(logical (inc (cpt ?cpt) (in ?in1))
(in (cpt ?in1) (in ?in2&~?in1)))
=>
(assert (inc (cpt ?cpt) (in ?in2)))
)
(printout t "**** INITIAL FACTS ****" crlf)
(facts)
(reset)
(run)
(printout t "**** AFTER RUN ****" crlf)
(facts)
(defrule test
(logical (inc (in ?cpt))
(not (inc (cpt ?cpt))))
=>
(assert (top (cpt ?cpt)))
)
(printout t "**** AFTER DEFRULE ****" crlf)
(facts)
(reset)
(run)
(printout t "**** AFTER NEW RUN ****" crlf)
(facts)