📄 misclns2.exp
字号:
TRUECLIPS> (batch "misclns2.bat")TRUECLIPS> (clear) ; CR0222CLIPS> (remove misclns2.tmp)FALSECLIPS> (remove misclns2.bin)FALSECLIPS> (load misclns2.tmp)[ARGACCES2] Function load was unable to open file misclns2.tmp.FALSECLIPS> (bload misclns2.bin)[ARGACCES2] Function bload was unable to open file misclns2.bin.FALSECLIPS> (open "misclns2.tmp" misc2 "w")TRUECLIPS> (printout misc2 "(defrule foo =>)")CLIPS> (close misc2)TRUECLIPS> (load misclns2.tmp)*TRUECLIPS> (bsave misclns2.bin)TRUECLIPS> (bload misclns2.tmp)[BLOAD2] File misclns2.tmp is not a binary construct file.FALSECLIPS> (bload misclns2.bin)TRUECLIPS> (clear)CLIPS> (remove misclns2.tmp)TRUECLIPS> (open "misclns2.tmp" misc2 "w")TRUECLIPS> (printout misc2 "(defrule foo bar =>)")CLIPS> (close misc2)TRUECLIPS> (load misclns2.tmp)*[PRNTUTIL2] Syntax Error: Check appropriate syntax for defrule.ERROR:(defrule MAIN::foo barFALSECLIPS> (remove misclns2.tmp)TRUECLIPS> (remove misclns2.bin)TRUECLIPS> (clear) ; CR0218CLIPS> (insert$ (create$ 1 2) 1000 3)(1 2 3)CLIPS> (clear) ; CR0181 & CR0213CLIPS> (defclass FOO (is-a USER) (role concrete) (pattern-match reactive))CLIPS> (defrule foo1 (declare (salience 5)) =>)CLIPS> (defrule foo2 (declare (salience 4)) (not (b)) =>)CLIPS> (defrule foo3 (declare (salience 3)) (test (> 5 3)) =>)CLIPS> (defrule foo4 (declare (salience 2)) (test (> 5 3)) (not (b)) =>)CLIPS> (defrule foo5 (declare (salience 1)) (not (object (is-a FOO))) =>)CLIPS> (defrule foo6 (test (> 5 3)) (not (object (is-a FOO))) =>)CLIPS> (reset)CLIPS> (agenda)5 foo1: f-04 foo2: f-0,3 foo3: f-02 foo4: f-0,1 foo5: [initial-object],0 foo6: [initial-object],For a total of 6 activations.CLIPS> (clear) ; Bug TestCLIPS> (defrule foo1 (bar a $?x b) => (printout t "1: " ?x crlf))CLIPS> (defrule foo2 (bar $?x a) => (printout t "2: " ?x crlf))CLIPS> (defrule foo3 (bar a b $?x c d) => (printout t "3: " ?x crlf))CLIPS> (assert (bar a b c d))<Fact-0>CLIPS> (assert (bar a b 1 2 3 c d))<Fact-1>CLIPS> (agenda)0 foo3: f-10 foo3: f-0For a total of 2 activations.CLIPS> (run)3: (1 2 3)3: ()CLIPS> (clear) ; Bug TestCLIPS> (defrule foo1 (bar) =>)CLIPS> (defrule foo2 (bar ?) =>)CLIPS> (defrule foo3 (bar () =>))[PRNTUTIL2] Syntax Error: Check appropriate syntax for defrule.ERROR:(defrule MAIN::foo3 (bar (CLIPS> (defrule foo4 (bar ~) =>)[PRNTUTIL2] Syntax Error: Check appropriate syntax for defrule.ERROR:(defrule MAIN::foo4 (bar ~)CLIPS> (ppdefrule foo1)(defrule MAIN::foo1 (bar) =>)CLIPS> (ppdefrule foo2)(defrule MAIN::foo2 (bar ?) =>)CLIPS> (assert (bar))<Fact-0>CLIPS> (assert (bar 1))<Fact-1>CLIPS> (agenda)0 foo2: f-10 foo1: f-0For a total of 2 activations.CLIPS> (clear)CLIPS> (deftemplate yak (multifield bar))CLIPS> (defrule foo1 (yak (bar)) =>)CLIPS> (defrule foo2 (yak (bar ?)) =>)CLIPS> (defrule foo3 (yak (bar ()) =>))[PRNTUTIL2] Syntax Error: Check appropriate syntax for defrule.ERROR:(defrule MAIN::foo3 (yak (bar (CLIPS> (defrule foo4 (yak (bar ~)) =>)[PRNTUTIL2] Syntax Error: Check appropriate syntax for defrule.ERROR:(defrule MAIN::foo4 (yak (bar ~)CLIPS> (ppdefrule foo1)(defrule MAIN::foo1 (yak (bar)) =>)CLIPS> (ppdefrule foo2)(defrule MAIN::foo2 (yak (bar ?)) =>)CLIPS> (assert (yak (bar)))<Fact-0>CLIPS> (assert (yak (bar 1)))<Fact-1>CLIPS> (agenda)0 foo2: f-10 foo1: f-0For a total of 2 activations.CLIPS> (clear) ; Bug TestCLIPS> (defrule foo (a $?x b) => (printout t ?x crlf))CLIPS> (assert (a b))<Fact-0>CLIPS> (assert (a c b))<Fact-1>CLIPS> (agenda)0 foo: f-10 foo: f-0For a total of 2 activations.CLIPS> (run)(c)()CLIPS> (clear) ; Bug TestCLIPS> (defrule blah (fact $?x here $?x) => (printout t ?x crlf))CLIPS> (assert (fact))<Fact-0>CLIPS> (assert (fact 1 here 2))<Fact-1>CLIPS> (assert (fact 1 2 here 3 4))<Fact-2>CLIPS> (assert (fact here))<Fact-3>CLIPS> (assert (fact 5 here 5))<Fact-4>CLIPS> (assert (fact 6 7 here 6 7))<Fact-5>CLIPS> (assert (fact 6 7 here 6 8))<Fact-6>CLIPS> (assert (fact 6 8 here 7 8))<Fact-7>CLIPS> (agenda)0 blah: f-50 blah: f-40 blah: f-3For a total of 3 activations.CLIPS> (run)(6 7)(5)()CLIPS> (clear) ; Use of reserved symbolsCLIPS> (deftemplate and "example")[PATTERN1] The symbol and has special meaningand may not be used as a deftemplate name.ERROR:(deftemplate MAIN::and "example")CLIPS> (deftemplate not)[PATTERN1] The symbol not has special meaningand may not be used as a deftemplate name.ERROR:(deftemplate MAIN::not)CLIPS> (deftemplate or "example")[PATTERN1] The symbol or has special meaningand may not be used as a deftemplate name.ERROR:(deftemplate MAIN::or "example")CLIPS> (deftemplate test)[PATTERN1] The symbol test has special meaningand may not be used as a deftemplate name.ERROR:(deftemplate MAIN::test)CLIPS> (deftemplate logical "example" (field y))[PATTERN1] The symbol logical has special meaningand may not be used as a deftemplate name.ERROR:(deftemplate MAIN::logical "example" (CLIPS> (deftemplate exists)[PATTERN1] The symbol exists has special meaningand may not be used as a deftemplate name.ERROR:(deftemplate MAIN::exists)CLIPS> (deftemplate forall (field x))[PATTERN1] The symbol forall has special meaningand may not be used as a deftemplate name.ERROR:(deftemplate MAIN::forall (CLIPS> (deftemplate object "example")[PATTERN1] The symbol object has special meaningand may not be used as a deftemplate name.ERROR:(deftemplate MAIN::object "example")CLIPS> (assert (and))[PATTERN1] The symbol and has special meaningand may not be used as a relation name.CLIPS> (assert (not b))[PATTERN1] The symbol not has special meaningand may not be used as a relation name.CLIPS> (defrule foo => (assert (or c)))[PATTERN1] The symbol or has special meaningand may not be used as a relation name.ERROR:(defrule MAIN::foo => (assert (orCLIPS> (assert (test))[PATTERN1] The symbol test has special meaningand may not be used as a relation name.CLIPS> (assert (logical))[PATTERN1] The symbol logical has special meaningand may not be used as a relation name.CLIPS> (assert (this) (exists))[PATTERN1] The symbol exists has special meaningand may not be used as a relation name.CLIPS> (assert (forall) (that))[PATTERN1] The symbol forall has special meaningand may not be used as a relation name.CLIPS> (assert (object))[PATTERN1] The symbol object has special meaningand may not be used as a relation name.CLIPS> (clear) ; First pattern field usageCLIPS> (defrule foo ($?x&abc) =>)[PRNTUTIL2] Syntax Error: Check appropriate syntax for the first field of a pattern.ERROR:(defrule MAIN::foo ($?xCLIPS> (clear) ; Order DependencyCLIPS> (deftemplate foo (field x) (field y))CLIPS> (defrule blah (foo (y ?y&:(numberp ?y)) (x =(+ ?y 1))) =>)CLIPS> (assert (foo (y a) (x 3)))<Fact-0>CLIPS> (clear) ; Bind & RHS constraintsCLIPS> (deftemplate foo (field x (type SYMBOL)))CLIPS> (defrule bar1 (foo (x ?x)) => (+ ?x 1))[RULECSTR3] Previous variable bindings of ?x caused the type restrictionsfor argument #1 of the expression (+ ?x 1)found in the rule's RHS to be violated.ERROR:(defrule MAIN::bar1 (foo (x ?x)) => (+ ?x 1))CLIPS> (defrule bar2 (foo (x ?x)) => (sym-cat ?x ?x))CLIPS> (defrule bar3 (foo (x ?x)) => (bind ?x 3) (sym-cat ?x ?x) (+ ?x 1))CLIPS> (defrule bar4 (foo (x ?x)) => (sym-cat ?x ?x) (+ ?x 1) (bind ?x 3))CLIPS> (clear) ; Thing 1CLIPS> (defrule foo ?f <- (bar) (test (neq ?f g)) =>)CLIPS> (clear) ; Thing 2CLIPS> (deftemplate status (field farmer) (field fox))CLIPS> (defrule move-alone (status (farmer ?fs)) =>)CLIPS> (defrule move-with-fox (status (farmer ?fs) (fox ?fs))=>)CLIPS> (deffacts stuff (status (farmer 1) (fox 2)) (status (farmer 3) (fox 3)))CLIPS> (reset)CLIPS> (agenda)0 move-alone: f-20 move-with-fox: f-20 move-alone: f-1For a total of 3 activations.CLIPS> (clear) ; Thing 3CLIPS> (load other1.clp)%$[CSTRCPSR1] Expected the beginning of a construct.$FALSECLIPS> (clear) ; Thing 4CLIPS> (defrule foo "12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890" =>)CLIPS> (clear) ; Thing 5CLIPS> (deftemplate foo (field x) (field y))CLIPS> (defrule bar (foo (y ?y&:(> ?y 3))) =>)CLIPS> (assert (foo (y a)))[ARGACCES5] Function > expected argument #1 to be of type integer or float[FACTMCH1] This error occurred in the fact pattern network Currently active fact: (foo (x nil) (y a)) Problem resides in slot y Of pattern #1 in rule(s): bar<Fact-0>CLIPS> (defrule yak (quo ? ?x&:(> ?x 3)) =>)CLIPS> (assert (quo b a))[ARGACCES5] Function > expected argument #1 to be of type integer or float[FACTMCH1] This error occurred in the fact pattern network Currently active fact: (quo b a) Problem resides in field #2 Of pattern #1 in rule(s): yak<Fact-1>CLIPS> (clear) ; Thing 6CLIPS> (watch facts)CLIPS> (reset)==> f-0 (initial-fact)CLIPS> (clear)CLIPS> (clear) ; Thing 7CLIPS> (deftemplate bar (slot y) (slot x) (slot z))CLIPS> (defrule foo1 (bar (x ?x&:(> ?x 3))) =>)CLIPS> (defrule foo2 (bar (y ?x&:(> ?x 3))) =>)CLIPS> (defrule foo3 (bar (z ?x&:(> ?x 3))) =>)CLIPS> (assert (bar (x a) (y 1) (z 1)))==> f-0 (bar (y 1) (x a) (z 1))[ARGACCES5] Function > expected argument #1 to be of type integer or float[FACTMCH1] This error occurred in the fact pattern network Currently active fact: (bar (y 1) (x a) (z 1)) Problem resides in slot x Of pattern #1 in rule(s): foo1<Fact-0>CLIPS> (assert (bar (x 1) (y a) (z 1)))==> f-1 (bar (y a) (x 1) (z 1))[ARGACCES5] Function > expected argument #1 to be of type integer or float[FACTMCH1] This error occurred in the fact pattern network Currently active fact: (bar (y a) (x 1) (z 1)) Problem resides in slot y Of pattern #1 in rule(s): foo2<Fact-1>CLIPS> (assert (bar (x 1) (y 1) (z a)))==> f-2 (bar (y 1) (x 1) (z a))[ARGACCES5] Function > expected argument #1 to be of type integer or float[FACTMCH1] This error occurred in the fact pattern network Currently active fact: (bar (y 1) (x 1) (z a)) Problem resides in slot z Of pattern #1 in rule(s): foo3<Fact-2>CLIPS> (clear) ; Thing 8CLIPS> (defrule foo1 (bar ?x&:(> ?x 3) ?) =>)CLIPS> (defrule foo2 (bar ? ?x&:(> ?x 3)) =>)CLIPS> (assert (bar a 1))==> f-0 (bar a 1)[ARGACCES5] Function > expected argument #1 to be of type integer or float[FACTMCH1] This error occurred in the fact pattern network Currently active fact: (bar a 1) Problem resides in field #1 Of pattern #1 in rule(s): foo1<Fact-0>CLIPS> (assert (bar 1 a))==> f-1 (bar 1 a)[ARGACCES5] Function > expected argument #1 to be of type integer or float[FACTMCH1] This error occurred in the fact pattern network Currently active fact: (bar 1 a) Problem resides in field #2 Of pattern #1 in rule(s): foo2<Fact-1>CLIPS> (clear) ; Can't delete deftemplates while they're being usedCLIPS> (deftemplate foo)CLIPS> (undeftemplate foo)CLIPS> (deftemplate foo)CLIPS> (assert (foo))==> f-0 (foo)<Fact-0>CLIPS> (undeftemplate foo)[PRNTUTIL4] Unable to delete deftemplate foo.CLIPS> (defrule foobar => (assert (foo)))CLIPS> (undeftemplate foo)[PRNTUTIL4] Unable to delete deftemplate foo.CLIPS> (retract 0)<== f-0 (foo)CLIPS> (undeftemplate foo)[PRNTUTIL4] Unable to delete deftemplate foo.CLIPS> (undefrule foobar)CLIPS> (undeftemplate foo)CLIPS> (clear)CLIPS> (deftemplate foo)CLIPS> (defrule bar (foo) =>)CLIPS> (deftemplate foo)[CSTRCPSR4] Cannot redefine deftemplate foo while it is in use.ERROR:(deftemplate MAIN::fooCLIPS> (clear)CLIPS> (deftemplate foo)CLIPS> (deftemplate foo (slot x))CLIPS> (clear) ; Next ThingCLIPS> (dribble-off)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -