📄 drtest05.exp
字号:
TRUECLIPS> (batch "drtest05.bat")TRUECLIPS> (clear) ; DR0405CLIPS> (deffacts first (fact1 =(reset))) ; DR0405CLIPS> (reset) ; DR0405CLIPS> (facts) ; DR0405f-0 (initial-fact)f-1 (fact1)For a total of 2 facts.CLIPS> (clear) ; DR0410CLIPS> (defrule foo ; DR0410 (fact ?x&:(and (< ?x 3) (> ?x 1))) =>)CLIPS> (assert (fact a)) ; DR0410 - Only one error message[ARGACCES5] Function < expected argument #1 to be of type integer or float[FACTMCH1] This error occurred in the fact pattern network Currently active fact: (fact a) Problem resides in field #1 Of pattern #1 in rule(s): foo<Fact-0>CLIPS> (clear) ; DR0411CLIPS> (defrule foo ; DR0411 (fact ?x) (fact $?y) (test (eq ?y (str-explode ?x))) =>)CLIPS> (reset) ; DR0411CLIPS> (assert (fact "a b c")) ; DR0411<Fact-1>CLIPS> (assert (fact a b c)) ; DR0411<Fact-2>CLIPS> (agenda) ; DR04110 foo: f-1,f-2For a total of 1 activation.CLIPS> (facts) ; DR0411f-0 (initial-fact)f-1 (fact "a b c")f-2 (fact a b c)For a total of 3 facts.CLIPS> (save-facts "foo.tmp") ; DR0411TRUECLIPS> (reset) ; DR0411CLIPS> (load-facts "foo.tmp") ; DR0411TRUECLIPS> (facts) ; DR0411f-0 (initial-fact)f-1 (fact "a b c")f-2 (fact a b c)For a total of 3 facts.CLIPS> (agenda) ; DR04110 foo: f-1,f-2For a total of 1 activation.CLIPS> (clear) ; DR0427CLIPS> (deftemplate first (fild one)) ; DR0427[PRNTUTIL2] Syntax Error: Check appropriate syntax for deftemplate.ERROR:(deftemplate MAIN::first (fildCLIPS> (list-deftemplates) ; DR0427initial-factFor a total of 1 deftemplate.CLIPS> (eval (str-cat ; DR0435 (printout t " fact-list "))) ; DR0435[ARGACCES5] Function str-cat expected argument #1 to be of type non-void return valueCLIPS> (clear) ; DR0441CLIPS> (deftemplate a) ; DR0441CLIPS> (assert (a)) ; DR0441<Fact-0>CLIPS> (clear) ; DR0441CLIPS> (list-deftemplates) ; DR0441initial-factFor a total of 1 deftemplate.CLIPS> (clear) ; DR0445CLIPS> (deftemplate congestion ; DR0445 (field no-of-nets))CLIPS> (deftemplate total ; DR0445 (field net-name) (field cong))CLIPS> (deffacts start ; DR0445 (congestion (no-of-nets 5)) (total (net-name 8) (cong nil)) (total (net-name 4) (cong 5)))CLIPS> (defrule p403 ; DR0445 ?t1 <- (total (cong nil)) (congestion (no-of-nets ?non)) => (retract ?t1))CLIPS> (defrule p410 ; DR0445 (total (net-name ?nn) (cong ?non)) (not (total (cong nil))) ?t <- (total (net-name ~?nn) (cong ?x&:(<= ?x ?non))) => (retract ?t))CLIPS> (watch facts) ; DR0445CLIPS> (reset) ; DR0445==> f-0 (initial-fact)==> f-1 (congestion (no-of-nets 5))==> f-2 (total (net-name 8) (cong nil))==> f-3 (total (net-name 4) (cong 5))CLIPS> (run) ; DR0445<== f-2 (total (net-name 8) (cong nil))CLIPS> (unwatch facts) ; DR0445CLIPS> (clear) ; DR0447CLIPS> (deffacts one ; DR0447 (first =(assert let's see))) ; DR0447[PRNTUTIL2] Syntax Error: Check appropriate syntax for RHS patterns.ERROR:(deffacts MAIN::one (first =(assert let'sCLIPS> (clear) ; DR0451CLIPS> (defrule erroneous-syntax-error ; DR0451 (fact1 test ?symbol&:(eq ?symbol :) ?num) =>) CLIPS> (clear) ; DR0452CLIPS> (deftemplate a (fileld one) (field two))[PRNTUTIL2] Syntax Error: Check appropriate syntax for deftemplate.ERROR:(deftemplate MAIN::a (fileldCLIPS> (defrule b ; DR0452 (not (a (one first) (three second))) => (assert (problem))) ; DR0452[PRNTUTIL2] Syntax Error: Check appropriate syntax for defrule.ERROR:(defrule MAIN::b (not (a (CLIPS> (clear) ; DR0453CLIPS> (deftemplate a (field one)) ; DR0453CLIPS> (defrule a ; DR0453 ?f1 <- (a (one two three)) => (assert (not good))) ; DR0453[PRNTUTIL2] Syntax Error: Check appropriate syntax for deftemplate patterns.ERROR:(defrule MAIN::a ?f1 <- (a (one two threeCLIPS> (clear) ; DR0460CLIPS> (deftemplate a ; DR0460 (field one) (field two))CLIPS> (defrule one ; DR0460 ?fact <- (a) => (modify ?a (two)))[PRCCODE3] Undefined variable a referenced in RHS of defrule.ERROR:(defrule MAIN::one ?fact <- (a) => (modify ?a (two)))CLIPS> (clear) ; DR0462CLIPS> (defrule a => (assert (x ?h))) ; DR0462[PRCCODE3] Undefined variable h referenced in RHS of defrule.ERROR:(defrule MAIN::a => (assert (x ?h)))CLIPS> (reset) ; DR0462CLIPS> (watch rules) ; DR0462CLIPS> (run) ; DR0462CLIPS> (unwatch rules) ; DR0462CLIPS> (clear) ; DR0466CLIPS> (defrule a ?f1 <- (fact 1) => (eval "(retract ?f1)"))CLIPS> (reset) ; DR0466CLIPS> (assert (fact 1)) ; DR0466<Fact-1>CLIPS> (run) ; DR0466[STRNGFUN2] Some variables could not be accessed by the eval function.[PRCCODE4] Execution halted during the actions of defrule a.CLIPS> (facts) ; DR0466f-0 (initial-fact)f-1 (fact 1)For a total of 2 facts.CLIPS> (mod 160 100) ; DR047560CLIPS> (mod (+ 100 60) 100) ; DR047560CLIPS> (send diamond get-hardness) ; DR0478[MSGFUN1] No applicable primary message-handlers found for get-hardness.FALSECLIPS> (clear) ; DR0479CLIPS> (defclass FOO (is-a USER) ; DR0479 (role concrete) (multislot BAR (create-accessor read-write)))CLIPS> (make-instance foo of FOO) ; DR0479 - [foo][foo]CLIPS> (send [foo] put-BAR a b c) ; DR0479 - TRUE(a b c)CLIPS> (find-instance ((?x FOO)) ; DR0479 (member d (send ?x get-BAR))) ; DR0479 - ()()CLIPS> (clear) ; DR0480CLIPS> (defclass mineral (is-a USER) ; DR0480 (role concrete) (slot gemname (create-accessor read-write)) (slot group (create-accessor read-write)))CLIPS> (definstances gems ; DR0480 (almandite of mineral (gemname almandite) (class garnet)) (grossularite of mineral (gemname grossularite) (group garnet)) (spessartite of mineral (gemname spessartite) (group garnet)))CLIPS> (reset) ; DR0480 - one error message[INSMNGR13] Slot class does not exist in instance almandite.CLIPS> (clear) ; DR0484CLIPS> (send [bogus-instance] bogus-message) ; DR0484[MSGPASS2] No such instance bogus-instance in function send.FALSECLIPS> (clear) ; DR0486CLIPS> (defrule allie ; DR0486 (menu compress) (compress ?nos ?range ?no&:(eq ?no 1))=> (printout t "rule allie ?nos= " ?nos " ?range= " ?range " " ?no crlf))CLIPS> (reset) ; DR0486CLIPS> (assert (menu compress)) ; DR0486<Fact-1>CLIPS> (assert (compress "19k" "date" 1)) ; DR0486<Fact-2>CLIPS> (run) ; DR0486rule allie ?nos= 19k ?range= date 1CLIPS> "1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890" ; DR0488"1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890"CLIPS> (instance-address [bogus]) ; DR0491 - Error should contain function name[INSFUN2] No such instance bogus in function instance-address.FALSECLIPS> (instance-namep [foo]) ; DR0492 - TRUETRUECLIPS> (clear) ; DR0494CLIPS> (defmethod foo (?a)) ; DR0494CLIPS> (defmethod foo ((?a NUMBER))) ; DR0494CLIPS> (preview-generic foo 45) ; DR0494foo #2 (NUMBER)foo #1 ()CLIPS> (clear) ; DR0495CLIPS> (defmethod foo ()) ; DR0495CLIPS> (ppdefmethod foo 1) ; DR0495(defmethod MAIN::foo ())CLIPS> (clear) ; DR0496CLIPS> (defmethod foo ((?a INTEGER SYMBOL)))CLIPS> (defmethod foo ((?a INTEGER))) ; DR0496CLIPS> (list-defmethods) ; DR0496foo #2 (INTEGER)foo #1 (INTEGER SYMBOL)For a total of 2 methods.CLIPS> (clear) ; DR0499CLIPS> (defmethod foo 1 (?a)) ; DR0499CLIPS> (defmethod foo 2 () (undefmethod foo 1))CLIPS> (foo) ; DR0499[GENRCFUN1] Defgeneric foo cannot be modified while one of its methods is executing.CLIPS> (clear) ; DR0500CLIPS> (defclass a (is-a USER) (role concrete)) ; DR0500CLIPS> (defmessage-handler a create-new-handler () (build "(defmessage-handler a new-handler ())"))CLIPS> (make-instance a of a) ; DR0500 - [a][a]CLIPS> (send [a] create-new-handler) ; DR0500 - Error[MSGPSR2] Cannot (re)define message-handlers during execution of other message-handlers for the same class.ERROR:(defmessage-handler MAIN::a new-handlerFALSECLIPS> (dribble-off)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -