⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 drtest06.exp

📁 NASA 开发使用的一个专家系统
💻 EXP
📖 第 1 页 / 共 2 页
字号:
CLIPS> (clear)                            ; DR0548CLIPS> (set-incremental-reset FALSE)      ; DR0548TRUECLIPS> (defrule foo (not (a)) =>)         ; DR0548CLIPS> (reset)                            ; DR0548CLIPS> (agenda)                           ; DR0548 - 1 Activation0      foo: f-0,For a total of 1 activation.CLIPS> (clear)                            ; DR0548CLIPS> (set-incremental-reset TRUE)       ; DR0548FALSECLIPS> (clear)                            ; DR0549CLIPS> (defclass A (is-a USER) (role concrete) (slot xy (create-accessor read-write)))CLIPS> (make-instance a of A    ((sym-cat x y) 34))             ; DR0549[a]CLIPS> (send [a] print)                   ; DR0549[a] of A(xy 34)CLIPS> (clear)                            ; DR0551CLIPS> (set-strategy breadth)             ; DR0551depthCLIPS> (defrule blah (declare (salience 10)) =>)CLIPS> (defrule flub (declare (salience -10)) =>)CLIPS> (reset)                            ; DR0551CLIPS> (agenda)                           ; DR0551 - blah, flub10     blah: f-0-10    flub: f-0For a total of 2 activations.CLIPS> (set-strategy depth)               ; DR0551breadthCLIPS> (clear)                            ; DR0552CLIPS> (defclass A (is-a USER) (role concrete)); DR0552CLIPS> (defclass B (is-a USER) (role concrete)); DR0552CLIPS> (make-instance a1 of A)            ; DR0552 - [a1][a1]CLIPS> (make-instance a2 of A)            ; DR0552 - [a2][a2]CLIPS> (make-instance b1 of B)            ; DR0552 - [b1][b1]CLIPS> (make-instance b2 of B)            ; DR0552 - [b2][b2]CLIPS> (do-for-all-instances ((?a A)) TRUE   (do-for-all-instances ((?b B)) TRUE     (printout t (instance-name ?a) " "                  (instance-name ?b) crlf))) ; [a1][b1], [a1][b2], [a2][b1], [a2][b2][a1] [b1][a1] [b2][a2] [b1][a2] [b2]CLIPS> (format nil "%d1234567890123456789012345678901234567890" 333) ; DR0559"3331234567890123456789012345678901234567890"CLIPS> (clear)                            ; DR0561CLIPS> (deftemplate foo                   ; DR0561   (field x (type EXTERNAL-ADDRESS)))CLIPS> (assert (foo))                     ; DR0561<Fact-0>CLIPS> (facts)                            ; DR0561f-0     (foo (x <Pointer-0>)) ;; Any NULL pointer is OKFor a total of 1 fact.CLIPS> (clear)                            ; DR0562CLIPS> (deffunction foo ()                ; DR0562   (+ ?a 1) (bind ?a 2))           ; DR0562CLIPS> (foo)                              ; DR0562 - Error[PRCCODE5] Variable a unbound in deffunction foo.[ARGACCES5] Function + expected argument #1 to be of type integer or float[PRCCODE4] Execution halted during the actions of deffunction foo.FALSECLIPS> (clear)                            ; DR0566CLIPS> (bind ?a 3)                        ; DR0566 - 33CLIPS> (bind ?b 4)                        ; DR0566 - 44CLIPS> (+ ?a 3)                           ; DR0566 - Error[EVALUATN1] Variable a is unbound[ARGACCES5] Function + expected argument #1 to be of type integer or float0CLIPS> (+ ?a ?b)                          ; DR0566 - Error[EVALUATN1] Variable a is unbound[ARGACCES5] Function + expected argument #1 to be of type integer or float0CLIPS> (+ ?e 4)                           ; DR0566 - Error[EVALUATN1] Variable e is unbound[ARGACCES5] Function + expected argument #1 to be of type integer or float0CLIPS> (clear)                            ; DR0567CLIPS> (deffunction foo (?a ?a))          ; DR0567 - Error[PRCCODE7] Duplicate parameter names not allowed.ERROR:(deffunction MAIN::foo   (?a ?aCLIPS> (format t "%s (Yes or No)" "Play Again?") ; DR0568Play Again? (Yes or No)"Play Again? (Yes or No)"CLIPS> (clear)                            ; DR0569CLIPS> (defclass A (is-a USER)            ; DR0569   (role concrete)   (slot unassigned-parcels)   (slot x-location (create-accessor read-write)))CLIPS> (make-instance a of A)             ; DR0569 - [a][a]CLIPS> (send [a] put-x-location 34)       ; DR0569 - TRUE34CLIPS> (clear)                            ; DR0570CLIPS> (deffunction defgeneric ())        ; DR0570 - Error[DFFNXPSR1] Deffunctions are not allowed to replace constructs.ERROR:(deffunction MAIN::defgeneric   (CLIPS> (deffunction defclass ())          ; DR0570 - Error[DFFNXPSR1] Deffunctions are not allowed to replace constructs.ERROR:(deffunction MAIN::defclass   (CLIPS> (deffunction deftemplate ())       ; DR0570 - Error[DFFNXPSR1] Deffunctions are not allowed to replace constructs.ERROR:(deffunction MAIN::deftemplate   (CLIPS> (deffunction defmethod ())         ; DR0570 - Error[DFFNXPSR1] Deffunctions are not allowed to replace constructs.ERROR:(deffunction MAIN::defmethod   (CLIPS> (deffunction deffacts ())          ; DR0570 - Error[DFFNXPSR1] Deffunctions are not allowed to replace constructs.ERROR:(deffunction MAIN::deffacts   (CLIPS> (list-deffunctions)                ; DR0570 - NoneCLIPS> (clear)                            ; DR0571CLIPS> (defglobal ?*x* = 3)               ; DR0571CLIPS> (assert (a))                       ; DR0571<Fact-0>CLIPS> (defrule foo ?f <- (a) => (bind ?*x* ?f))CLIPS> (run)                              ; DR0571CLIPS> (printout t ?*x* crlf)             ; DR0571<Fact-0>CLIPS> ?*x*                               ; DR0571<Fact-0>CLIPS> (clear)                            ; DR0573CLIPS> (defclass A (is-a USER))           ; DR0573CLIPS> (defclass B (is-a USER))           ; DR0573CLIPS> (defclass C (is-a A B) (role concrete)) ; DR0573CLIPS> (make-instance c of C)             ; DR0573 - [c][c]CLIPS> (instances)                        ; DR0573 - 1 instance[c] of CFor a total of 1 instance.CLIPS> (instances MAIN B inherit)              ; DR0573 - 1 instance[c] of CFor a total of 1 instance.CLIPS> (do-for-all-instances ((?u USER)) TRUE    (printout t ?u crlf))          ; DR0573 - 1 instance[c]CLIPS> (clear)                            ; DR0575CLIPS> (defrule try-or (or (a) (b)) =>)   ; DR0575CLIPS> (bsave "drtest06.bin")             ; DR0575TRUECLIPS> (clear)                            ; DR0575CLIPS> (bload "drtest06.bin")             ; DR0575TRUECLIPS> (clear)                            ; DR0575CLIPS> (clear)                            ; DR0576CLIPS> (deffunction bar () (eval "(+ 5 6)"))CLIPS> (deffunction foo () (eval "(+ 3 4 (bar))"))CLIPS> (foo)                              ; DR0576 - 1818CLIPS> (bar)                              ; DR0576 - 1111CLIPS> (clear)                            ; DR0577CLIPS> (defclass A (is-a USER) (slot foo (create-accessor read-write)))CLIPS> (defclass B (is-a A))              ; DR0577CLIPS> (defmessage-handler A put-foo ())  ; DR0577 - Error[MSGPSR3] System message-handlers may not be modified.ERROR:(defmessage-handler MAIN::A put-foo   (CLIPS> (defmessage-handler B get-foo ())  ; DR0577 - OKCLIPS> (defmessage-handler B put-foo ())  ; DR0577 - OKCLIPS> (clear)                            ; DR0584 - Behavior changedCLIPS> (defclass A (is-a USER)            ; DR0584   (role concrete)   (slot foo (access read-only) (default 5)))CLIPS> (defmessage-handler A put-foo primary (?value)  (dynamic-put foo ?value))CLIPS> (make-instance a of A)             ; DR0584 - [a][a]CLIPS> (instances)                        ; DR0584[a] of AFor a total of 1 instance.CLIPS> (save-instances "drtest06.tmp")    ; DR05841CLIPS> (unmake-instance a)                ; DR0584TRUECLIPS> (load-instances "drtest06.tmp")    ; DR0584[MSGFUN3] foo slot in [a] of A: write access denied.[PRCCODE4] Execution halted during the actions of message-handler put-foo primary in class A[INSFILE1] Function load-instances could not completely process file drtest06.tmp.0CLIPS> (instances)                        ; DR0584CLIPS> (restore-instances "drtest06.tmp") ; See CRS1CLIPS> (instances)                        ; DR0584[a] of AFor a total of 1 instance.CLIPS> (clear)                            ; DR0588CLIPS> (ppdefinstances Teams)             ; DR0588[PRNTUTIL1] Unable to find definstances Teams.CLIPS> (clear)                            ; DR0590CLIPS> (undefinstances *)                 ; DR0590CLIPS> (undefinstances Tom)               ; DR0590[PRNTUTIL1] Unable to find definstances Tom.CLIPS> (clear)                            ; DR0591CLIPS> (defrule two                       ; DR0591   =>  (clear)  (printout t "Rule Fired" crlf))CLIPS> (reset)                            ; DR0591    CLIPS> (run)                              ; DR0591[CONSTRCT1] Some constructs are still in use. Clear cannot continue.Rule FiredCLIPS> (clear)                            ; DR0592CLIPS> (deftemplate color                 ; DR0592   (field standard      (type SYMBOL)      (default white)      (allowed-symbols red white blue)))CLIPS>  (defrule one                      ; DR0592 - Error    ?f1 <- (color (standard ?))    =>    (modify ?f1 (standard none)))[CSTRNCHK1] A literal slot value found in the modify commanddoes not match the allowed values for slot standard.ERROR:(defrule MAIN::one   ?f1 <- (color (standard ?))   =>   (modify ?f1 (standard none)))CLIPS> (release-mem)                      ; DR059218335 ;; Different number is OKCLIPS> (clear)                            ; DR0594CLIPS> (defrule junk => (bsave drtest06.bin))     CLIPS> (reset)                            ; DR0594CLIPS> (run)                              ; DR0594CLIPS> (bload drtest06.bin)               ; DR0594TRUECLIPS> (reset)                            ; DR0594CLIPS> (run)                              ; DR0594[BSAVE1] Cannot perform a binary save while a binary load is in effect.CLIPS> (div 11.0 .5)                      ; DR0595[PRNTUTIL7] Attempt to divide by zero in div function.1CLIPS> (clear)                            ; DR0600CLIPS> (defmethod blah 1 ())              ; DR0600CLIPS> (defmethod blah (?a))              ; DR0600CLIPS> (list-defmethods)                  ; DR0600blah #2  ()blah #1  For a total of 2 methods.CLIPS> (dribble-off)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -