TRUE CLIPS> (batch "factscmd.bat") TRUE CLIPS> (clear) CLIPS> (facts) ; facts CLIPS> (assert (a) (b) (c) (d) (e) (f)) CLIPS> (facts) f-1 (a) f-2 (b) f-3 (c) f-4 (d) f-5 (e) f-6 (f) For a total of 6 facts. CLIPS> (facts 1 2 3 4 5) [ARGACCES1] Function 'facts' expected no more than 4 arguments. CLIPS> (facts "a") [ARGACCES2] Function 'facts' expected argument #1 to be of type integer or symbol. CLIPS> (facts 1 a) [ARGACCES2] Function 'facts' expected argument #2 to be of type integer. CLIPS> (facts 1 2 a) [ARGACCES2] Function 'facts' expected argument #3 to be of type integer. CLIPS> (facts -1 5 2) [ARGACCES2] Function 'facts' expected argument #1 to be of type symbol or 'positive number'. CLIPS> (facts 4 -1 2) [ARGACCES2] Function 'facts' expected argument #2 to be of type positive number. CLIPS> (facts 3 4 -2) [ARGACCES2] Function 'facts' expected argument #3 to be of type positive number. CLIPS> (facts 4 2) CLIPS> (facts 5) f-5 (e) f-6 (f) For a total of 2 facts. CLIPS> (facts 3 5) f-3 (c) f-4 (d) f-5 (e) For a total of 3 facts. CLIPS> (facts 2 6 2) f-2 (b) f-3 (c) For a total of 2 facts. CLIPS> (save-facts) ; save-facts and load-facts [ARGACCES1] Function 'save-facts' expected at least 1 argument. CLIPS> (save-facts 10) [ARGACCES2] Function 'save-facts' expected argument #1 to be of type symbol or string. CLIPS> (save-facts "Temp//factscmd.tmp" 10) [ARGACCES2] Function 'save-facts' expected argument #2 to be of type symbol. CLIPS> (save-facts "Temp//factscmd.tmp") 6 CLIPS> (clear) CLIPS> (facts) CLIPS> (load-facts) [ARGACCES1] Function 'load-facts' expected exactly 1 argument. CLIPS> (load-facts 10) [ARGACCES2] Function 'load-facts' expected argument #1 to be of type symbol or string. CLIPS> (load-facts "Temp//factscmd.tmp" 10) [ARGACCES1] Function 'load-facts' expected exactly 1 argument. CLIPS> (load-facts "Temp//factscmd.tmp") 6 CLIPS> (facts) f-1 (a) f-2 (b) f-3 (c) f-4 (d) f-5 (e) f-6 (f) For a total of 6 facts. CLIPS> (clear) ; dependencies and dependents CLIPS> (defrule foo1 (logical (a) (b)) => (assert (e))) CLIPS> (defrule foo2 (logical (b)) (c) => (assert (e))) CLIPS> (defrule foo3 (logical (d) (b) (a)) (c) => (assert (e))) CLIPS> (defrule foo4 (logical (d) (b) (a) (c)) => (assert (e))) CLIPS> (defrule foo5 (logical (a) (c) (d)) => (assert (e))) CLIPS> (defrule foo6 (declare (salience -1)) (logical (c) (d)) => (assert (f))) CLIPS> (defrule foo7 (declare (salience -1)) (logical (a)) (c) => (assert (f))) CLIPS> (defrule foo8 (declare (salience -1)) (logical (c) (a)) (d) => (assert (f))) CLIPS> (defrule foo9 (declare (salience -2)) (logical (d) (c) (b)) => (assert (g))) CLIPS> (assert (a) (b) (c) (d)) CLIPS> (run) CLIPS> (facts) f-1 (a) f-2 (b) f-3 (c) f-4 (d) f-5 (e) f-6 (f) f-7 (g) For a total of 7 facts. CLIPS> (dependencies) [ARGACCES1] Function 'dependencies' expected exactly 1 argument. CLIPS> (dependencies a) [PRNTUTIL1] Unable to find instance a. CLIPS> (dependencies 10) [PRNTUTIL1] Unable to find fact f-10. CLIPS> (dependencies 5 6) [ARGACCES1] Function 'dependencies' expected exactly 1 argument. CLIPS> (dependencies 5) f-1,f-2 f-2 f-1,f-3,f-4 f-4,f-2,f-1,f-3 f-4,f-2,f-1 CLIPS> (dependencies 3) None CLIPS> (dependents) [ARGACCES1] Function 'dependents' expected exactly 1 argument. CLIPS> (dependents a) [PRNTUTIL1] Unable to find instance a. CLIPS> (dependents 10) [PRNTUTIL1] Unable to find fact f-10. CLIPS> (dependents 5 6) [ARGACCES1] Function 'dependents' expected exactly 1 argument. CLIPS> (dependents 1) f-5,f-6 CLIPS> (dependents 2) f-5,f-7 CLIPS> (dependents 3) f-5,f-6,f-7 CLIPS> (dependents 4) f-5,f-6,f-7 CLIPS> (dependents 5) None CLIPS> (dependents 6) None CLIPS> (clear) ; get-fact-duplication and set-fact-duplication CLIPS> (assert (a)) CLIPS> (assert (a)) CLIPS> (facts) f-1 (a) For a total of 1 fact. CLIPS> (get-fact-duplication) FALSE CLIPS> (get-fact-duplication TRUE) [ARGACCES1] Function 'get-fact-duplication' expected exactly 0 arguments. CLIPS> (set-fact-duplication) [ARGACCES1] Function 'set-fact-duplication' expected exactly 1 argument. CLIPS> (set-fact-duplication TRUE FALSE) [ARGACCES1] Function 'set-fact-duplication' expected exactly 1 argument. CLIPS> (set-fact-duplication 10) FALSE CLIPS> (get-fact-duplication) TRUE CLIPS> (set-fact-duplication TRUE) TRUE CLIPS> (get-fact-duplication) TRUE CLIPS> (clear) CLIPS> (assert (a)) CLIPS> (assert (a)) CLIPS> (facts) f-1 (a) f-2 (a) For a total of 2 facts. CLIPS> (set-fact-duplication FALSE) TRUE CLIPS> (get-fact-duplication) FALSE CLIPS> (clear) CLIPS> (assert (a)) CLIPS> (assert (a)) CLIPS> (facts) f-1 (a) For a total of 1 fact. CLIPS> (clear) ;; New 6.0 Stuff CLIPS> (defmodule A) CLIPS> (assert (x) (y) (z)) CLIPS> (defmodule B) CLIPS> (assert (a) (b) (c)) CLIPS> (facts) f-4 (a) f-5 (b) f-6 (c) For a total of 3 facts. CLIPS> (facts A) f-1 (x) f-2 (y) f-3 (z) For a total of 3 facts. CLIPS> (facts B) f-4 (a) f-5 (b) f-6 (c) For a total of 3 facts. CLIPS> (facts *) f-1 (x) f-2 (y) f-3 (z) f-4 (a) f-5 (b) f-6 (c) For a total of 6 facts. CLIPS> (clear) ;; New 6.24 stuff CLIPS> (ppfact) [ARGACCES1] Function 'ppfact' expected at least 1 argument. CLIPS> (ppfact a) [ARGACCES2] Function 'ppfact' expected argument #1 to be of type integer or fact address. CLIPS> (ppfact 2) [PRNTUTIL1] Unable to find fact f-2. CLIPS> (deftemplate person (slot name)(slot age (default 0))) CLIPS> (assert (person (name Me))) CLIPS> (ppfact 1) (person (name Me) (age 0)) CLIPS> (ppfact 1 bogus) [ROUTER1] Logical name 'bogus' was not recognized by any routers. CLIPS> (ppfact 1 nil) "(person (name Me) (age 0))" CLIPS> (ppfact 1 t) (person (name Me) (age 0)) CLIPS> (ppfact 1 t FALSE) (person (name Me) (age 0)) CLIPS> (ppfact 1 t TRUE) (person (name Me)) CLIPS> (ppfact 1 nil FALSE) "(person (name Me) (age 0))" CLIPS> (ppfact 1 nil TRUE) "(person (name Me))" CLIPS> (deftemplate bar (slot w) (slot x (default 3)) (multislot y) (multislot z (default a b))) CLIPS> (assert (bar)) CLIPS> (ppfact 2 t FALSE) (bar (w nil) (x 3) (y) (z a b)) CLIPS> (ppfact 2 t TRUE) (bar) CLIPS> (assert (bar (w 1) (x 2) (y 3) (z 4))) CLIPS> (ppfact 3 t FALSE) (bar (w 1) (x 2) (y 3) (z 4)) CLIPS> (ppfact 3 t TRUE) (bar (w 1) (x 2) (y 3) (z 4)) CLIPS> (defglobal ?*b* = (assert (bar (w 5) (x 6)))) CLIPS> (retract ?*b*) CLIPS> (ppfact ?*b*) [PRNTUTIL11] The fact f-4 has been retracted. CLIPS> (clear) CLIPS> (deftemplate point (slot x) (slot y)) CLIPS> (bind ?f (assert (point (x 1) (y 2)))) CLIPS> (bind ?g (duplicate ?f (x 3))) CLIPS> (modify ?f (x 4)) CLIPS> (retract ?f) CLIPS> (modify ?f (y 5)) [PRNTUTIL11] The fact f-1 has been retracted. FALSE CLIPS> (retract ?g) CLIPS> (duplicate ?g (x 6)) [PRNTUTIL11] The fact f-2 has been retracted. FALSE CLIPS> (clear) CLIPS> (dribble-off)