⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dftmpcmd.exp

📁 NASA 开发使用的一个专家系统
💻 EXP
字号:
TRUECLIPS> (batch "dftmpcmd.bat")TRUECLIPS> (clear)CLIPS> (deftemplate d1)CLIPS> (deftemplate d2 (field x))CLIPS> (deftemplate d3 (field x (type STRING)))CLIPS> (deftemplate d4 (field x) (multifield y) (field z))CLIPS> (deftemplate d5   (field x (type ?VARIABLE) (default 30))  (field y (type STRING SYMBOL) (allowed-symbols a b) (allowed-strings "a" "b"))  (field z (type NUMBER) (allowed-integers 1) (allowed-floats 3.5))  (field w (type NUMBER) (range 3.5 9))  (multifield q (type SYMBOL NUMBER) (allowed-symbols x) (default)))CLIPS> (deftemplate d6   (multifield q (cardinality 2 6))  (field x (type ?VARIABLE) (default ?NONE))  (field y (type STRING SYMBOL) (allowed-symbols ?VARIABLE)))CLIPS> (deftemplate *)CLIPS> (list-deftemplates d6)[ARGACCES5] Function list-deftemplates expected argument #1 to be of type defmodule nameCLIPS> (list-deftemplates)initial-factd1d2d3d4d5d6*For a total of 8 deftemplates.CLIPS> (ppdeftemplate d1)(deftemplate MAIN::d1)CLIPS> (ppdeftemplate d2)(deftemplate MAIN::d2   (field x))CLIPS> (ppdeftemplate d3)(deftemplate MAIN::d3   (field x (type STRING)))CLIPS> (ppdeftemplate d4)(deftemplate MAIN::d4   (field x)   (multifield y)   (field z))CLIPS> (ppdeftemplate d5)(deftemplate MAIN::d5   (field x (type ?VARIABLE) (default 30))   (field y (type STRING SYMBOL) (allowed-symbols a b) (allowed-strings "a" "b"))   (field z (type NUMBER) (allowed-integers 1) (allowed-floats 3.5))   (field w (type NUMBER) (range 3.5 9))   (multifield q (type SYMBOL NUMBER) (allowed-symbols x) (default)))CLIPS> (ppdeftemplate d6)(deftemplate MAIN::d6   (multifield q (cardinality 2 6))   (field x (type ?VARIABLE) (default ?NONE))   (field y (type STRING SYMBOL) (allowed-symbols ?VARIABLE)))CLIPS> (get-dynamic-constraint-checking)FALSECLIPS> (get-dynamic-constraint-checking TRUE)[ARGACCES4] Function get-dynamic-constraint-checking expected exactly 0 argument(s)CLIPS> (assert (d3 (x 7)))[CSTRNCHK1] A literal slot value found in the assert commanddoes not match the allowed types for slot x.CLIPS> (facts)CLIPS> (assert (d3 (x =(read))))7<Fact-0>CLIPS> (facts)f-0     (d3 (x 7))For a total of 1 fact.CLIPS> (retract *)CLIPS> (set-dynamic-constraint-checking)[ARGACCES4] Function set-dynamic-constraint-checking expected exactly 1 argument(s)CLIPS> (set-dynamic-constraint-checking TRUE FALSE)[ARGACCES4] Function set-dynamic-constraint-checking expected exactly 1 argument(s)CLIPS> (set-dynamic-constraint-checking 10)FALSECLIPS> (get-dynamic-constraint-checking)TRUECLIPS> (set-dynamic-constraint-checking TRUE)TRUECLIPS> (assert (d3 (x 8)))[CSTRNCHK1] A literal slot value found in the assert commanddoes not match the allowed types for slot x.CLIPS> (facts)CLIPS> (assert (d3 (x =(read))))8[CSTRNCHK1] Slot value 8 found in fact f-1     does not match the allowed types for slot x.<Fact-1>CLIPS> (facts)f-1     (d3 (x 8))For a total of 1 fact.CLIPS> (retract *)CLIPS> (set-dynamic-constraint-checking FALSE)TRUECLIPS> (get-dynamic-constraint-checking)FALSECLIPS> (undeftemplate)[ARGACCES4] Function undeftemplate expected exactly 1 argument(s)CLIPS> (undeftemplate 10)[ARGACCES5] Function undeftemplate expected argument #1 to be of type symbolCLIPS> (undeftemplate bad-name)[PRNTUTIL1] Unable to find deftemplate bad-name.CLIPS> (undeftemplate d6 10)[ARGACCES4] Function undeftemplate expected exactly 1 argument(s)CLIPS> (list-deftemplates)initial-factd1d2d3d4d5d6*For a total of 8 deftemplates.CLIPS> (undeftemplate d1)CLIPS> (undeftemplate d2)CLIPS> (undeftemplate d3)CLIPS> (list-deftemplates)initial-factd4d5d6*For a total of 5 deftemplates.CLIPS> (undeffacts initial-fact)CLIPS> (undeftemplate *)CLIPS> (list-deftemplates)initial-factd4d5d6For a total of 4 deftemplates.CLIPS> (undeftemplate *)CLIPS> (list-deftemplates)CLIPS> (clear) ; Some new 6.0 featuresCLIPS> (deftemplate BOGUS::d5)[PRNTUTIL1] Unable to find defmodule BOGUS.ERROR:(deftemplate BOGUS::d5CLIPS> (defmodule FOO)CLIPS> (deftemplate FOO::d1)CLIPS> (deftemplate FOO::d2)CLIPS> (defmodule BAR)CLIPS> (deftemplate BAR::d2)CLIPS> (deftemplate BAR::d3)CLIPS> (list-deftemplates BOGUS)[ARGACCES5] Function list-deftemplates expected argument #1 to be of type defmodule nameCLIPS> (list-deftemplates FOO 7)[ARGACCES4] Function list-deftemplates expected no more than 1 argument(s)CLIPS> (list-deftemplates FOO)d1d2For a total of 2 deftemplates.CLIPS> (list-deftemplates BAR)d2d3For a total of 2 deftemplates.CLIPS> (list-deftemplates)d2d3For a total of 2 deftemplates.CLIPS> (list-deftemplates *)MAIN:   initial-factFOO:   d1   d2BAR:   d2   d3For a total of 5 deftemplates.CLIPS> (get-deftemplate-list 7)[ARGACCES5] Function get-deftemplate-list expected argument #1 to be of type symbolCLIPS> (get-deftemplate-list BOGUS 7)[ARGACCES4] Function get-deftemplate-list expected no more than 1 argument(s)CLIPS> (get-deftemplate-list)(d2 d3)CLIPS> (get-deftemplate-list BOGUS)[ARGACCES5] Function get-deftemplate-list expected argument #1 to be of type defmodule name()CLIPS> (get-deftemplate-list FOO)(d1 d2)CLIPS> (get-deftemplate-list BAR)(d2 d3)CLIPS> (get-deftemplate-list *)(MAIN::initial-fact FOO::d1 FOO::d2 BAR::d2 BAR::d3)CLIPS> (ppdeftemplate d1)[PRNTUTIL1] Unable to find deftemplate d1.CLIPS> (ppdeftemplate d2)(deftemplate BAR::d2)CLIPS> (ppdeftemplate d3)(deftemplate BAR::d3)CLIPS> (ppdeftemplate BOGUS::d2)[PRNTUTIL1] Unable to find deftemplate BOGUS::d2.CLIPS> (ppdeftemplate FOO::d1)(deftemplate FOO::d1)CLIPS> (ppdeftemplate FOO::d2)(deftemplate FOO::d2)CLIPS> (ppdeftemplate FOO::d3)[PRNTUTIL1] Unable to find deftemplate FOO::d3.CLIPS> (ppdeftemplate BAR::d1)[PRNTUTIL1] Unable to find deftemplate BAR::d1.CLIPS> (ppdeftemplate BAR::d2)(deftemplate BAR::d2)CLIPS> (ppdeftemplate BAR::d3)(deftemplate BAR::d3)CLIPS> (deftemplate-module)[ARGACCES4] Function deftemplate-module expected exactly 1 argument(s)CLIPS> (deftemplate-module bogus)[PRNTUTIL1] Unable to find deftemplate bogus.FALSECLIPS> (deftemplate-module d3 7)[ARGACCES4] Function deftemplate-module expected exactly 1 argument(s)CLIPS> (deftemplate-module d2)BARCLIPS> (deftemplate-module d3)BARCLIPS> (deftemplate-module FOO::d1)FOOCLIPS> (deftemplate-module FOO::d2)FOOCLIPS> (deftemplate-module BAR::d2)BARCLIPS> (deftemplate-module BAR::d3)BARCLIPS> (undeftemplate BOGUS::d2)[PRNTUTIL1] Unable to find deftemplate BOGUS::d2.CLIPS> (undeftemplate FOO::d2)CLIPS> (list-deftemplates *)MAIN:   initial-factFOO:   d1BAR:   d2   d3For a total of 4 deftemplates.CLIPS> (undeftemplate BAR::d2)CLIPS> (list-deftemplates *)MAIN:   initial-factFOO:   d1BAR:   d3For a total of 3 deftemplates.CLIPS> (undeftemplate *)CLIPS> (list-deftemplates *)MAIN:   initial-factFOO:   d1BAR:For a total of 2 deftemplates.CLIPS> (dribble-off)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -