TRUE CLIPS> (batch "misclns2.bat") TRUE CLIPS> (clear) ; CR0222 CLIPS> (remove misclns2.tmp) FALSE CLIPS> (remove misclns2.bin) FALSE CLIPS> (load misclns2.tmp) [ARGACCES3] Function 'load' was unable to open file 'misclns2.tmp'. FALSE CLIPS> (bload "Temp//misclns2.bin") [ARGACCES3] Function 'bload' was unable to open file 'Temp//misclns2.bin'. FALSE CLIPS> (open "Temp//misclns2.tmp" misc2 "w") TRUE CLIPS> (printout misc2 "(defrule foo =>)") CLIPS> (close misc2) TRUE CLIPS> (load "Temp//misclns2.tmp") * TRUE CLIPS> (bsave "Temp//misclns2.bin") TRUE CLIPS> (bload "Temp//misclns2.tmp") [BLOAD2] File 'Temp//misclns2.tmp' is not a binary construct file. FALSE CLIPS> (bload "Temp//misclns2.bin") TRUE CLIPS> (clear) CLIPS> (remove "Temp//misclns2.tmp") TRUE CLIPS> (open "Temp//misclns2.tmp" misc2 "w") TRUE CLIPS> (printout misc2 "(defrule foo bar =>)") CLIPS> (close misc2) TRUE CLIPS> (load "Temp//misclns2.tmp") * [PRNTUTIL2] Temp//misclns2.tmp, Line 1: Syntax Error: Check appropriate syntax for defrule. ERROR: (defrule MAIN::foo bar FALSE CLIPS> (remove "Temp//misclns2.tmp") TRUE CLIPS> (remove "Temp//misclns2.bin") TRUE CLIPS> (clear) ; CR0218 CLIPS> (insert$ (create$ 1 2) 1000 3) (1 2 3) CLIPS> (clear) ; CR0181 & CR0213 CLIPS> (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: * 4 foo2: * 3 foo3: * 2 foo4: *,* 1 foo5: * 0 foo6: *,* For a total of 6 activations. CLIPS> (clear) ; Bug Test CLIPS> (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)) CLIPS> (assert (bar a b 1 2 3 c d)) CLIPS> (agenda) 0 foo3: f-2 0 foo3: f-1 For a total of 2 activations. CLIPS> (run) 3: (1 2 3) 3: () CLIPS> (clear) ; Bug Test CLIPS> (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)) CLIPS> (assert (bar 1)) CLIPS> (agenda) 0 foo2: f-2 0 foo1: f-1 For 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))) CLIPS> (assert (yak (bar 1))) CLIPS> (agenda) 0 foo2: f-2 0 foo1: f-1 For a total of 2 activations. CLIPS> (clear) ; Bug Test CLIPS> (defrule foo (a $?x b) => (printout t ?x crlf)) CLIPS> (assert (a b)) CLIPS> (assert (a c b)) CLIPS> (agenda) 0 foo: f-2 0 foo: f-1 For a total of 2 activations. CLIPS> (run) (c) () CLIPS> (clear) ; Bug Test CLIPS> (defrule blah (fact $?x here $?x) => (printout t ?x crlf)) CLIPS> (assert (fact)) CLIPS> (assert (fact 1 here 2)) CLIPS> (assert (fact 1 2 here 3 4)) CLIPS> (assert (fact here)) CLIPS> (assert (fact 5 here 5)) CLIPS> (assert (fact 6 7 here 6 7)) CLIPS> (assert (fact 6 7 here 6 8)) CLIPS> (assert (fact 6 8 here 7 8)) CLIPS> (agenda) 0 blah: f-6 0 blah: f-5 0 blah: f-4 For a total of 3 activations. CLIPS> (run) (6 7) (5) () CLIPS> (clear) ; Use of reserved symbols CLIPS> (deftemplate and "example") [PATTERN1] The symbol 'and' has special meaning and may not be used as a deftemplate name. ERROR: (deftemplate MAIN::and "example") CLIPS> (deftemplate not) [PATTERN1] The symbol 'not' has special meaning and may not be used as a deftemplate name. ERROR: (deftemplate MAIN::not) CLIPS> (deftemplate or "example") [PATTERN1] The symbol 'or' has special meaning and may not be used as a deftemplate name. ERROR: (deftemplate MAIN::or "example") CLIPS> (deftemplate test) [PATTERN1] The symbol 'test' has special meaning and may not be used as a deftemplate name. ERROR: (deftemplate MAIN::test) CLIPS> (deftemplate logical "example" (field y)) [PATTERN1] The symbol 'logical' has special meaning and may not be used as a deftemplate name. ERROR: (deftemplate MAIN::logical "example" ( CLIPS> (deftemplate exists) [PATTERN1] The symbol 'exists' has special meaning and may not be used as a deftemplate name. ERROR: (deftemplate MAIN::exists) CLIPS> (deftemplate forall (field x)) [PATTERN1] The symbol 'forall' has special meaning and may not be used as a deftemplate name. ERROR: (deftemplate MAIN::forall ( CLIPS> (deftemplate object "example") [PATTERN1] The symbol 'object' has special meaning and may not be used as a deftemplate name. ERROR: (deftemplate MAIN::object "example") CLIPS> (assert (and)) [PATTERN1] The symbol 'and' has special meaning and may not be used as a relation name. CLIPS> (assert (not b)) [PATTERN1] The symbol 'not' has special meaning and may not be used as a relation name. CLIPS> (defrule foo => (assert (or c))) [PATTERN1] The symbol 'or' has special meaning and may not be used as a relation name. ERROR: (defrule MAIN::foo => (assert (or CLIPS> (assert (test)) [PATTERN1] The symbol 'test' has special meaning and may not be used as a relation name. CLIPS> (assert (logical)) [PATTERN1] The symbol 'logical' has special meaning and may not be used as a relation name. CLIPS> (assert (this) (exists)) [PATTERN1] The symbol 'exists' has special meaning and may not be used as a relation name. CLIPS> (assert (forall) (that)) [PATTERN1] The symbol 'forall' has special meaning and may not be used as a relation name. CLIPS> (assert (object)) [PATTERN1] The symbol 'object' has special meaning and may not be used as a relation name. CLIPS> (clear) ; First pattern field usage CLIPS> (defrule foo ($?x&abc) =>) [PRNTUTIL2] Syntax Error: Check appropriate syntax for the first field of a pattern. ERROR: (defrule MAIN::foo ($?x CLIPS> (clear) ; Order Dependency CLIPS> (deftemplate foo (field x) (field y)) CLIPS> (defrule blah (foo (y ?y&:(numberp ?y)) (x =(+ ?y 1))) =>) CLIPS> (assert (foo (y a) (x 3))) CLIPS> (clear) ; Bind & RHS constraints CLIPS> (deftemplate foo (field x (type SYMBOL))) CLIPS> (defrule bar1 (foo (x ?x)) => (+ ?x 1)) [RULECSTR3] Previous variable bindings of ?x caused the type restrictions for 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 1 CLIPS> (defrule foo ?f <- (bar) (test (neq ?f g)) =>) CLIPS> (clear) ; Thing 2 CLIPS> (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-2 0 move-with-fox: f-2 0 move-alone: f-1 For a total of 3 activations. CLIPS> (clear) ; Thing 3 CLIPS> (load other1.clp) %$ [CSTRCPSR1] other1.clp, Line 3: Expected the beginning of a construct. $ FALSE CLIPS> (clear) ; Thing 4 CLIPS> (defrule foo "12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890 12345678901234567890123456789012345678901234567890" =>) CLIPS> (clear) ; Thing 5 CLIPS> (deftemplate foo (field x) (field y)) CLIPS> (defrule bar (foo (y ?y&:(> ?y 3))) =>) CLIPS> (assert (foo (y a))) [ARGACCES2] 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 bar CLIPS> (defrule yak (quo ? ?x&:(> ?x 3)) =>) CLIPS> (assert (quo b a)) [ARGACCES2] 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 yak CLIPS> (clear) ; Thing 6 CLIPS> (watch facts) CLIPS> (reset) CLIPS> (clear) CLIPS> (clear) ; Thing 7 CLIPS> (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-1 (bar (y 1) (x a) (z 1)) [ARGACCES2] 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 foo1 CLIPS> (assert (bar (x 1) (y a) (z 1))) ==> f-2 (bar (y a) (x 1) (z 1)) [ARGACCES2] 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 foo2 CLIPS> (assert (bar (x 1) (y 1) (z a))) ==> f-3 (bar (y 1) (x 1) (z a)) [ARGACCES2] 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 foo3 CLIPS> (clear) ; Thing 8 CLIPS> (defrule foo1 (bar ?x&:(> ?x 3) ?) =>) CLIPS> (defrule foo2 (bar ? ?x&:(> ?x 3)) =>) CLIPS> (assert (bar a 1)) ==> f-1 (bar a 1) [ARGACCES2] 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 foo1 CLIPS> (assert (bar 1 a)) ==> f-2 (bar 1 a) [ARGACCES2] 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 foo2 CLIPS> (clear) ; Can't delete deftemplates while they're being used CLIPS> (deftemplate foo) CLIPS> (undeftemplate foo) CLIPS> (deftemplate foo) CLIPS> (assert (foo)) ==> f-1 (foo) 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 1) <== f-1 (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::foo CLIPS> (clear) CLIPS> (deftemplate foo) CLIPS> (deftemplate foo (slot x)) CLIPS> (clear) ; Next Thing CLIPS> (dribble-off)