📄 drtest08.exp
字号:
TRUECLIPS> (batch "drtest08.bat")TRUECLIPS> (reset) ; DR0675CLIPS> (defrule foo (initial-fact) (test (> 4 3)) =>)CLIPS> (agenda)0 foo: f-0For a total of 1 activation.CLIPS> (assert (a))<Fact-1>CLIPS> (defrule bar (initial-fact) (or (test (> 5 3)) (a)) =>)CLIPS> (agenda)0 bar: f-0,f-10 bar: f-00 foo: f-0For a total of 3 activations.CLIPS> (reset)CLIPS> (assert (a))<Fact-1>CLIPS> (agenda)0 bar: f-0,f-10 foo: f-00 bar: f-0For a total of 3 activations.CLIPS> (clear)CLIPS> (defmethod foo (?a) ; DR0676 (bind ?b 10) (call-next-method) ?b)CLIPS> (defmethod foo ($?any) (bind ?b 20))CLIPS> (foo bar)10CLIPS> (clear)CLIPS> (call-next-method 0) ; DR0677[ARGACCES4] Function call-next-method expected exactly 0 argument(s)CLIPS> (next-methodp 0)[ARGACCES4] Function next-methodp expected exactly 0 argument(s)CLIPS> (preview-generic)[ARGACCES4] Function preview-generic expected at least 1 argument(s)CLIPS> (clear)CLIPS> (delete-instance 0) ; DR0678[ARGACCES4] Function delete-instance expected exactly 0 argument(s)CLIPS> (init-slots 0)[ARGACCES4] Function init-slots expected exactly 0 argument(s)CLIPS> (ppinstance 0)[ARGACCES4] Function ppinstance expected exactly 0 argument(s)CLIPS> (clear)CLIPS> (print-region 1 2 3) ; DR0679[ARGACCES5] Function print-region expected argument #1 to be of type symbolCLIPS> (print-region t 2 3)[ARGACCES5] Function print-region expected argument #2 to be of type symbol or stringCLIPS> (clear)CLIPS> (defclass A (is-a USER)) ; DR0680CLIPS> (class-superclasses A inherit)(USER OBJECT)CLIPS> (defclass A (is-a USER))CLIPS> (class-superclasses A inherit)(USER OBJECT)CLIPS> (clear)CLIPS> ;; DRs 0681, 0682 and 0683 involve recompiling CLIPS(while 1 do ?a) ; DR0684[EVALUATN1] Variable a is unboundFALSECLIPS> (clear)CLIPS> (printout t ?a crlf) ; DR0685[EVALUATN1] Variable a is unboundCLIPS> (defrule foo => (printout t ?a) (bind ?a 1))CLIPS> (reset)CLIPS> (run)[PRCCODE5] Variable a unbound.[PRCCODE4] Execution halted during the actions of defrule foo.CLIPS> (clear)CLIPS> (str-cat abc (eval "(+ abc)") def) ; DR0686[ARGACCES4] Function + expected at least 2 argument(s)""CLIPS> (sym-cat abc (eval "(+ abc)") def)[ARGACCES4] Function + expected at least 2 argument(s)nilCLIPS> (clear)CLIPS> (deffunction foo (?a)) ; DR0687CLIPS> (foo (eval "(+ abc)"))[ARGACCES4] Function + expected at least 2 argument(s)[PRCCODE6] This error occurred while evaluating arguments for the deffunction foo.FALSECLIPS> (clear)CLIPS> (defgeneric any-instancep) ; DR0688[GENRCPSR16] The system function any-instancep cannot be overloaded.ERROR:(defgeneric MAIN::any-instancep)CLIPS> (defgeneric assert)[GENRCPSR16] The system function assert cannot be overloaded.ERROR:(defgeneric MAIN::assert)CLIPS> (defgeneric bind)[GENRCPSR16] The system function bind cannot be overloaded.ERROR:(defgeneric MAIN::bind)CLIPS> (defgeneric break)[GENRCPSR16] The system function break cannot be overloaded.ERROR:(defgeneric MAIN::break)CLIPS> (defgeneric call-next-handler)[GENRCPSR16] The system function call-next-handler cannot be overloaded.ERROR:(defgeneric MAIN::call-next-handler)CLIPS> (defgeneric call-next-method)[GENRCPSR16] The system function call-next-method cannot be overloaded.ERROR:(defgeneric MAIN::call-next-method)CLIPS> (defgeneric delayed-do-for-all-instances)[GENRCPSR16] The system function delayed-do-for-all-instances cannot be overloaded.ERROR:(defgeneric MAIN::delayed-do-for-all-instances)CLIPS> (defgeneric do-for-all-instances)[GENRCPSR16] The system function do-for-all-instances cannot be overloaded.ERROR:(defgeneric MAIN::do-for-all-instances)CLIPS> (defgeneric do-for-instance)[GENRCPSR16] The system function do-for-instance cannot be overloaded.ERROR:(defgeneric MAIN::do-for-instance)CLIPS> (defgeneric duplicate)[GENRCPSR16] The system function duplicate cannot be overloaded.ERROR:(defgeneric MAIN::duplicate)CLIPS> (defgeneric expand$)[GENRCPSR16] The system function expand$ cannot be overloaded.ERROR:(defgeneric MAIN::expand$)CLIPS> (defgeneric find-all-instances)[GENRCPSR16] The system function find-all-instances cannot be overloaded.ERROR:(defgeneric MAIN::find-all-instances)CLIPS> (defgeneric find-instance)[GENRCPSR16] The system function find-instance cannot be overloaded.ERROR:(defgeneric MAIN::find-instance)CLIPS> (defgeneric if)[GENRCPSR16] The system function if cannot be overloaded.ERROR:(defgeneric MAIN::if)CLIPS> (defgeneric initialize-instance)[GENRCPSR16] The system function initialize-instance cannot be overloaded.ERROR:(defgeneric MAIN::initialize-instance)CLIPS> (defgeneric make-instance)[GENRCPSR16] The system function make-instance cannot be overloaded.ERROR:(defgeneric MAIN::make-instance)CLIPS> (defgeneric modify)[GENRCPSR16] The system function modify cannot be overloaded.ERROR:(defgeneric MAIN::modify)CLIPS> (defgeneric next-handlerp)[GENRCPSR16] The system function next-handlerp cannot be overloaded.ERROR:(defgeneric MAIN::next-handlerp)CLIPS> (defgeneric next-methodp)[GENRCPSR16] The system function next-methodp cannot be overloaded.ERROR:(defgeneric MAIN::next-methodp)CLIPS> (defgeneric override-next-handler)[GENRCPSR16] The system function override-next-handler cannot be overloaded.ERROR:(defgeneric MAIN::override-next-handler)CLIPS> (defgeneric progn)[GENRCPSR16] The system function progn cannot be overloaded.ERROR:(defgeneric MAIN::progn)CLIPS> (defgeneric retract)CLIPS> (defgeneric return)[GENRCPSR16] The system function return cannot be overloaded.ERROR:(defgeneric MAIN::return)CLIPS> (defgeneric while)[GENRCPSR16] The system function while cannot be overloaded.ERROR:(defgeneric MAIN::while)CLIPS> (clear)CLIPS> (defmethod blah ;; DR0689 ((?a (progn (undefmethod blah *) TRUE))))CLIPS> (blah 1)[GENRCFUN1] Defgeneric blah cannot be modified while one of its methods is executing.FALSECLIPS> (clear)CLIPS> (defgeneric foo) ;; DR0690CLIPS> (foo (progn (undefgeneric foo) 1))[PRNTUTIL4] Unable to delete defgeneric foo.[GENRCEXE1] No applicable methods for foo.FALSECLIPS> (deffunction bar (?a))CLIPS> (bar (progn (undeffunction bar) 1))[PRNTUTIL4] Unable to delete deffunction bar.FALSECLIPS> (clear)CLIPS> (printout t (eval "(+ abc)") " OOPS " (eval "(+ abc)") crlf) ;; DR0691[ARGACCES4] Function + expected at least 2 argument(s)CLIPS> (clear)CLIPS> (deftemplate foo ;; DR0692 (multifield linkTagList))CLIPS> (defrule foo ?w<-(foo) => (modify ?w (linkTagList ?linktag ?linktagx ?a $?b)))[PRCCODE3] Undefined variable linktag referenced in RHS of defrule.ERROR:(defrule MAIN::foo ?w <- (foo) => (modify ?w (linkTagList ?linktag ?linktagx ?a $?b)))CLIPS> (clear)CLIPS> (unwatch all) ;; DR0693CLIPS> (defrule foo (logical (not (a))) => (assert (b)))CLIPS> (watch facts)CLIPS> (reset)==> f-0 (initial-fact)CLIPS> (run)==> f-1 (b)CLIPS> (assert (a))==> f-2 (a)<== f-1 (b)<Fact-2>CLIPS> (reset)<== f-0 (initial-fact)<== f-2 (a)==> f-0 (initial-fact)CLIPS> (defrule bar (declare (salience -1)) => (assert (a)))CLIPS> (run)==> f-1 (b)==> f-2 (a)<== f-1 (b)CLIPS> (unwatch all)CLIPS> (clear)CLIPS> (defclass A (is-a USER) (role concrete) (slot foo (create-accessor read-write)) (multislot bar (create-accessor read-write))) ;; DR0697 and DR0700CLIPS> (make-instance fribban of A)[fribban]CLIPS> (make-instance quoxnar of A)[quoxnar]CLIPS> (send [quoxnar] put-foo (instance-address [fribban]))<Instance-fribban>CLIPS> (send [quoxnar] put-bar (mv-append))()CLIPS> (unmake-instance [fribban])TRUECLIPS> (send (send [quoxnar] get-foo) print)[INSFUN4] Invalid instance-address in function send.FALSECLIPS> (save-instances "badfile.tmp")1CLIPS> (reset)CLIPS> (restore-instances "badfile.tmp")1CLIPS> (send [quoxnar] print)[quoxnar] of A(foo [fribban])(bar)CLIPS> (clear)CLIPS> (defglobal ?*x* = 0) ;; DR0698 and DR0701CLIPS> (deffunction create-number-2 () (bind ?*x* (nth 1 (str-explode "2.0"))) BOGUS)CLIPS> (deffunction create-number () (create-number-2))CLIPS> (deffunction force-garbage-collection () (bind ?i 0) (while (< ?i 10000) do (gensym*) (bind ?i (+ ?i 1))))CLIPS> (mv-append (create-number) ?*x* (bind ?*x* 0) (force-garbage-collection) (float (random)) (float (random)))(BOGUS 2.0 0 FALSE 29601.0 26138.0) ;; Last two fields can be differentCLIPS> (clear)CLIPS> (deffunction foo () ;; DR0699 (printout t Foo crlf))CLIPS> (defmethod bar () (foo))CLIPS> (bar)FooCLIPS> (undeffunction *)[DFFNXFUN1] WARNING: Deffunction foo only partially deleted due to usage by other constructs.CLIPS> (bar)FALSECLIPS> (ppdeffunction foo)CLIPS> (clear) ;; DR0700CLIPS> (defclass A (is-a USER) (role concrete) (multislot foo (create-accessor read-write)))CLIPS> (make-instance a of A (foo (mv-append)))[a]CLIPS> (send [a] print)[a] of A(foo)CLIPS> (save-instances "ins.tmp")1CLIPS> (unmake-instance [a])TRUECLIPS> (load-instances "ins.tmp")1CLIPS> (send [a] print)[a] of A(foo)CLIPS> (clear) ;; DR0704CLIPS> (defrule foo => (printout t [hdh] crlf))CLIPS> (reset)CLIPS> (run)[hdh]CLIPS> (bsave foo.bin)TRUECLIPS> (clear)CLIPS> (bload foo.bin)TRUECLIPS> (clear) ;; DR0705CLIPS> (= 5 (read))Whatever[ARGACCES5] Function = expected argument #2 to be of type integer or floatFALSECLIPS> (clear) ;; DR0707CLIPS> (defclass A (is-a USER) (role concrete) (slot foo (create-accessor read-write)))CLIPS> (make-instance a of A (foo "\"This is a string\""))[a]CLIPS> (send [a] print)[a] of A(foo ""This is a string"")CLIPS> (save-instances bogus.tmp)1CLIPS> (reset)CLIPS> (instances)[initial-object] of INITIAL-OBJECTFor a total of 1 instance.CLIPS> (load-instances bogus.tmp)1CLIPS> (send [a] print)[a] of A(foo ""This is a string"")CLIPS> (clear) ;; DR0713CLIPS> (defclass TEST (is-a USER) (role concrete) (slot item (create-accessor write)))CLIPS> (make-instance a of TEST)[a]CLIPS> (message-modify-instance [a] (item 3))TRUECLIPS> (clear)CLIPS> (dribble-off)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -