StudyDocs.ru Logo

Программирование на языке CLIPS.doc


(slot slide (type SYMBOL) (create-accessor read-write)) (slot hammer (type SYMBOL) (create-accessor read-write)) (slot chamber (type INTEGER) (create-accessor read-write)) (slot magazine (type SYMBOL) (create-accessor read-write)) (slot rounds (type INTEGER) (create-accessor read-write)) ) S - (statement (speaker Y) (tag N)) P - (claim (content F X) (reason N) (scope falsity)) Q - (claim (content T X) (reason N) (scope falsity)) (printout t crlf Statement is inconsistent if Y is a knave. Assumption A is a knight, so (T A) is true. f-3 (claim (content F A) (reason 1) (scope truth)) f-4 (claim (content T A) (reason 1) (scope truth)) FIRE 2 contra-truth f-1, f-2, f-4, f-3 Statement is inconsistent if A is a knight. f-3 (claim (content F A) (reason 1) (scope truth)) f-4 (claim (content T A) (reason 1) (scope truth)) f-1 (world (tag 1) (scope truth)) f-5 (world (tag 1) (scope falsity)) FIRE 3 unwrap-false f-5, f-2 Assumption f-0 (initial-fact) f-1 (world (tag 1) (scope truth) (context 0)) f-2 (statement (speaker A) (claim OR F A T B) (reason 0) (tag 1)) CLIPS (run) FIRE 1 unwrap-trues f-1,f-2 Assumption A is a knight, so (OR F A T B) is true. f-3 (claim (content OR F A T B) (reason 1) (scope truth) (context 0)) f-4 (claim (content T A) (reason 1) (scope truth) (context 0)) FIRE 2 left-or f-1,f-3 f-5 (claim (content F A) (reason 1) (scope truth) (context 1)) f-1 (world (tag 1) (scope truth) (context 0)) f-6 (world (tag 1) (scope truth) (context 1)) FIRE 3 contra-truth-scope f-6,f-4,f-5 Disjunct 1 is inconsistent with earlier truth context. f-5 (claim (content F A) (reason 1) (scope truth) (context 1)) FIRE 4 right-or f-6,f-3 .