📄 drtest07.exp
字号:
TRUECLIPS> (batch "drtest07.bat")TRUECLIPS> (clear) ; DR0602CLIPS> (subset (mv-append bar) ; DR0602 (mv-append "bar")) ; DR0602 - FALSEFALSECLIPS> (member fox (mv-append "fox")) ; DR0602 - FALSEFALSECLIPS> (clear) ; DR0604CLIPS> (defrule foo => (assert (x))) ; DR0604CLIPS> (bsave "foo.bin") ; DR0604TRUECLIPS> (clear) ; DR0604CLIPS> (defrule bar => (assert (y))) ; DR0604CLIPS> (bsave "bar.bin") ; DR0604TRUECLIPS> (clear) ; DR0604CLIPS> (bload "foo.bin") ; DR0604TRUECLIPS> (reset) ; DR0604CLIPS> (run) ; DR0604CLIPS> (facts) ; DR0604f-0 (initial-fact)f-1 (x)For a total of 2 facts.CLIPS> (bload "bar.bin") ; DR0604TRUECLIPS> (reset) ; DR0604CLIPS> (run) ; DR0604CLIPS> (facts) ; DR0604f-0 (initial-fact)f-1 (y)For a total of 2 facts.CLIPS> (clear) ; DR0606CLIPS> (defrule blah ; DR0606 => ; DR0606 (bsave me.bin) ; DR0606 (bload me.bin)) ; DR0606CLIPS> (reset) ; DR0606CLIPS> (run) ; DR0606The CLIPS environment could not be cleared.Binary load cannot continue.CLIPS> (tan (deg-rad 270)) ; DR0609 - Error[EMATHFUN3] Singularity at asymptote in tan function.0.0CLIPS> (sec (deg-rad 270)) ; DR0609 - Error[EMATHFUN3] Singularity at asymptote in sec function.0.0CLIPS> (clear) ; DR0610CLIPS> (release-mem) ; DR06103587 ;; Different number is OKCLIPS> (deffunction foo ($?x) ?x ?x FALSE)CLIPS> (foo a b c d e) ; DR0610FALSECLIPS> (clear) ; DR0610CLIPS> (release-mem) ; DR0610 - Memory Loss1428 ;; Different number is OKCLIPS> (clear) ; DR0612CLIPS> (release-mem) ; DR0612937 ;; Different number is OK - Reference numberCLIPS> (defrule x (not (a)) =>) ; DR0612CLIPS> (clear) ; DR0612CLIPS> (release-mem) ; DR0612 - Memory Loss2105 ;; Different number is OKCLIPS> (clear) ; DR0613CLIPS> (release-mem) ; DR0613937 ;; Different number is OK but should be same as reference numberCLIPS> (defrule x (not (a)) (not (b)) =>) CLIPS> (clear) ; DR0613CLIPS> (release-mem) ; DR0613 - Memory Loss2620 ;; Different number is OKCLIPS> (clear) ; DR0614CLIPS> (release-mem) ; DR0614937 ;; Different number is OK but should be same as reference numberCLIPS> (defglobal ?*x* = 3) ; DR0614CLIPS> (defglobal ?*x* = 4) ; DR0614CLIPS> (clear) ; DR0614CLIPS> (release-mem) ; DR0614 - Memory Loss1094 ;; Different number is OKCLIPS> (clear) ; DR0615CLIPS> (release-mem) ; DR0615937 ;; Different number is OK but should be same as reference numberCLIPS> (deftemplate x (multifield y) (multifield y))[PRNTUTIL5] The slot y has already been parsed.ERROR:(deftemplate MAIN::x (multifield y) (multifield yCLIPS> (clear) ; DR0615CLIPS> (release-mem) ; DR0615 - Memory Loss1025 ;; Different number is OKCLIPS> (clear) ; DR0616CLIPS> (release-mem) ; DR0616937 ;; Different number is OK but should be same as reference numberCLIPS> (any-instancep ((?a OBJECT) (?a OBJECT)) TRUE)[INSQYPSR1] Duplicate instance member variable name in function any-instancep.CLIPS> (clear) ; DR0616CLIPS> (release-mem) ; DR0616 - Memory Loss973 ;; Different number is OKCLIPS> (clear) ; DR0617CLIPS> (release-mem) ; DR0617937 ;; Different number is OK but should be same as reference numberCLIPS> (bind ?a 3) ; DR06173CLIPS> (clear) ; DR0617CLIPS> (release-mem) ; DR0617 - Memory Loss1103 ;; Different number is OKCLIPS> (clear) ; DR0619CLIPS> (str-explode "") ; DR0619()CLIPS> (deftemplate foo (field x) (field y))CLIPS> (str-explode "foo") ; DR0619(foo)CLIPS> (format t "%s" ; DR0621 "The allowed-values attribute cannot be used in conjunction with other value restriction attributes")The allowed-values attribute cannot be used in conjunction with other value restriction attributes"The allowed-values attribute cannot be used in conjunction with other value restriction attributes"CLIPS> (clear) ; DR0623CLIPS> (defclass A (is-a USER) ; DR0623 (multislot foo (create-accessor read-write)))CLIPS> (defclass B (is-a A) ; DR0623 (slot foo (propagation no-inherit) (storage shared) (create-accessor read-write)))CLIPS> (defclass C (is-a B) ; DR0623 (slot foo (source composite) (access read-only) (create-accessor read)))CLIPS> (describe-class C) ; DR0623================================================================================********************************************************************************Abstract: direct instances of this class cannot be created.Direct Superclasses: BInheritance Precedence: C B A USER OBJECTDirect Subclasses:--------------------------------------------------------------------------------SLOTS : FLD DEF PRP ACC STO MCH SRC VIS CRT OVRD-MSG SOURCE(S)foo : MLT STC INH R SHR RCT CMP PRV R NIL A CConstraint information for slots:SLOTS : SYM STR INN INA EXA FTA INT FLTfoo : + + + + + + + + RNG:[-oo..+oo] CRD:[0..+oo]--------------------------------------------------------------------------------Recognized message-handlers:init primary in class USERdelete primary in class USERprint primary in class USERdirect-modify primary in class USERmessage-modify primary in class USERdirect-duplicate primary in class USERmessage-duplicate primary in class USERget-foo primary in class Aput-foo primary in class Aget-foo primary in class Bput-foo primary in class Bget-foo primary in class C********************************************************************************================================================================================CLIPS> (clear) ; DR0625CLIPS> (release-mem) ; DR06253980 ;; Different number is OKCLIPS> (deftemplate a (field one)) ; DR0625 CLIPS> (defrule a ; DR0625 ?f1 <- (a (one two three)) =>)[PRNTUTIL2] Syntax Error: Check appropriate syntax for deftemplate patterns.ERROR:(defrule MAIN::a ?f1 <- (a (one two threeCLIPS> (clear) ; DR0625CLIPS> (release-mem) ; DR0625 - Memory Loss1649 ;; Different number is OKCLIPS> (clear) ; DR0626CLIPS> (deffacts one ; DR0626 (first =(assert let's see))) ; DR0626 - Bad PPForm[PRNTUTIL2] Syntax Error: Check appropriate syntax for RHS patterns.ERROR:(deffacts MAIN::one (first =(assert let'sCLIPS> (clear) ; DR0627CLIPS> (deftemplate a (field one)) ; DR0627CLIPS> (defrule a ; DR0627 ?f1 <- (a (one two three)) ; DR0627 => ; DR0627 (assert (not good))) ; DR0627[PRNTUTIL2] Syntax Error: Check appropriate syntax for deftemplate patterns.ERROR:(defrule MAIN::a ?f1 <- (a (one two threeCLIPS> (clear) ; DR0628CLIPS> (defmethod foo (?a)) ; DR0628CLIPS> (defmethod foo ((?a NUMBER))) ; DR0628CLIPS> (defmethod foo ((?a INTEGER FLOAT))) CLIPS> (list-defmethods) ; DR0628 - Check Precedencefoo #3 (INTEGER FLOAT)foo #2 (NUMBER)foo #1 ()For a total of 3 methods.CLIPS> (clear) ; DR0629CLIPS> (defclass A (is-a USER) ; DR0629 (role concrete) (multislot foo (default a) (create-accessor read-write)))CLIPS> (deffunction foo (?ins) ; DR0629 (bind ?a (send ?ins get-foo)) (printout t ?a " ") (printout t (send ?ins get-foo) " ") (mv-slot-replace ?ins foo 1 1 1) (printout t ?a " ") (printout t (send ?ins get-foo) crlf))CLIPS> (make-instance a of A) ; DR0629[a]CLIPS> (foo [a]) ; DR0629 - (a) (a) (a) (1)(a) (a) (a) (1)CLIPS> (clear) ; DR0630CLIPS> (defrule blah ; DR0630 ?f <- (initial-fact) (test (progn (retract ?f) TRUE)) =>)CLIPS> (reset) ; DR0630[FACTMNGR1] Facts may not be retracted during pattern-matchingCLIPS> (facts) ; DR0630f-0 (initial-fact)For a total of 1 fact.CLIPS> (agenda) ; DR06300 blah: f-0For a total of 1 activation.CLIPS> (clear) ; DR0633CLIPS> (set-incremental-reset FALSE) ; DR0633TRUECLIPS> (defrule not-fire (not (color)) =>)CLIPS> (agenda) ; DR0633CLIPS> (assert (color)) ; DR0633<Fact-0>CLIPS> (agenda) ; DR0633CLIPS> (clear) ; DR0633CLIPS> (set-incremental-reset TRUE) ; DR0633FALSECLIPS> (clear) ; DR0634CLIPS> (deffunction foo () ; DR0634 (bind ?i 1000) ; DR0634 (while (> ?i 0) do ; DR0634 (bind ?a (mv-append)) ; DR0634 (bind ?i (- ?i 1)))) ; DR0634CLIPS> (foo) ; DR0634FALSECLIPS> (clear) ; DR0635CLIPS> (format nil "1%N2%3$Q%d3%W" 5) ; DR0635"1N23$Q53W"CLIPS> (clear) ; DR0636CLIPS> (defrule blah (fact $?x here $?x) =>)CLIPS> (assert (fact 1 2 here 3 4)) ; DR0636<Fact-0>CLIPS> (agenda) ; DR0636CLIPS> (subsetp (mv-append a a b) (mv-append a b)) ; DR0637TRUECLIPS> (clear) ; DR0639CLIPS> (defrule foo (or (a) (b) (c)) =>) ; DR0639CLIPS> (assert (a) (b) (c)) ; DR0639<Fact-2>CLIPS> (agenda) ; DR06390 foo: f-20 foo: f-10 foo: f-0For a total of 3 activations.CLIPS> (run) ; DR0639CLIPS> (refresh foo) ; DR0639CLIPS> (agenda) ; DR06390 foo: f-20 foo: f-10 foo: f-0For a total of 3 activations.CLIPS> (clear) ; DR0640CLIPS> (defclass A (is-a USER) (role concrete)); DR0640CLIPS> (make-instance a of A) ; DR0640[a]CLIPS> (defglobal ?*x* = (instance-address a))CLIPS> (initialize-instance a) ; DR0640[a]CLIPS> (clear) ; DR0642CLIPS> (deffunction foo () (do-for-all-instances ((?a USER)) TRUE (send ?a print)) (printout t "Finished." crlf))CLIPS> (ppdeffunction foo) ; DR0642(deffunction MAIN::foo ()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -