; ======================================================================= ; FILENAME: bartizan.demo ; DATE: April 9, 2007 ; PROGRAMMER: Jeff Howell ;; this template version: snepsul-template.demo-20061005.txt ; Lines beginning with a semi-colon are comments. ; Lines beginning with "^" are Lisp commands. ; All other lines are SNePSUL commands. ; ; To use this file: run SNePS; at the SNePS prompt (*), type: ; ; (demo "bartizan.demo" :av) ; ; Make sure all necessary files are in the current working directory ; or else use full path names. ; ======================================================================= ; Turn off inference tracing. ; This is optional; if tracing is desired, then delete this. ^(setq snip:*infertrace* nil) ; Load the appropriate definition algorithm: ;; UNCOMMENT THE ONE YOU *DO* WANT ;; AND DELETE THE OTHER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ^(load "defun_noun.cl") ; ^(load "/projects/rapaport/CVA/STN2/defun_verb.cl") ; Clear the SNePS network: (resetnet) ; OPTIONAL: ; UNCOMMENT THE FOLLOWING CODE TO TURN FULL FORWARD INFERENCING ON: ; ; ;enter the "snip" package: ^(in-package snip) ; ; ;turn on full forward inferencing: ^(defun broadcast-one-report (represent) (let (anysent) (do.chset (ch *OUTGOING-CHANNELS* anysent) (when (isopen.ch ch) (setq anysent (or (try-to-send-report represent ch) anysent))))) nil) ; ; ;re-enter the "sneps" package: ^(in-package sneps) ; load all pre-defined relations: (intext "/projects/rapaport/CVA/STN2/demos/rels") ; load all pre-defined path definitions: (intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") ; BACKGROUND KNOWLEDGE: ; ===================== ; If archer-slits are part of something, that class of thing has the property of being ; used for defense. (assert forall ($archerslits $fordefense $fdclass) &ant ((build member *archerslits class (build lex "archer-slits")) (build part *archerslits whole *fordefense) (build member *fordefense class *fdclass)) cq (build subclass *fdclass superclass (build lex "used for defense"))) ; If murder-holes are part of something, that thing is a guard tower. (assert forall ($murderhole $guardtower) &ant ((build member *murderhole class (build lex "murder-holes")) (build part *murderhole whole *guardtower)) cq (build member *guardtower class (build lex "guard tower"))) ; If something contains murder-holes, that thing is above an entryway. (assert forall ($murderholes $aboveentry) &ant ((build member *murderholes class (build lex "murder-holes")) (build part *murderholes whole *aboveentry)) cq (build member #entryway class (build lex "entryway")) cq (build object1 *aboveentry rel (build lex "above") object2 *entryway)) ; If murder-holes are part of something, that class of thing has the property of being ; used for defense. ;(assert forall ($murderholes $fordefense $fdclass) ; &ant ((build member *murderholes class (build lex "murder-holes")) ; (build part *murderholes whole *fordefense) ; (build member *fordefense class *fdclass)) ; cq (build subclass *fdclass superclass (build lex "used for defense"))) ; If object A overshadows object B, the class of object A is a subclass of ; high things. (assert forall ($overshadowed $higher $hclass) &ant ((build member *higher class *hclass) (build object1 *higher rel (build lex "overshadows") object2 *overshadowed)) cq (build subclass *hclass superclass (build lex "high"))) ; CASSIE READS THE PASSAGE: ; ========================= ; Something is a bartizan. (add member #bartizan class (build lex "bartizan")) ^(defineNoun "bartizan") ; The bartizan is angular. (add object *bartizan property (build lex "angular")) ^(defineNoun "bartizan") ; Something is a home. (add member #home class (build lex "home") = home-concept) ; The bartizan is part of the home. (add part *bartizan whole *home) ^(defineNoun "bartizan") ; Something(s) is/are small windows. (add member #small-windows class (build lex "small windows")) ; The small windows are part of the bartizan. (add part *small-windows whole *bartizan) ^(defineNoun "bartizan") ; Something(s) is/are murder-holes. (add member #murder-holes class (build lex "murder-holes")) ; The murder-holes are part of the bartizan. (add part *murder-holes whole *bartizan) ^(defineNoun "bartizan") ; Something(s) is/are archer-slits. (add member #archer-slits class (build lex "archer-slits")) ; The archer-slits are part of the bartizan. (add part *archer-slits whole *bartizan) ^(defineNoun "bartizan") ; Something is a crest. (add member #crest class (build lex "crest")) ; The crest is part of the home. (add part *crest whole *home) ; The bartizan overshadows the crest. (add object1 *bartizan rel (build lex "overshadows") object2 *crest) ^(defineNoun "bartizan") ; Something is a fortification (add member #fortification class (build lex "fortification")) ; The fortification is ancient. (add object *fortification property (build lex "ancient")) ; The home is part of the fortification. (add part *home whole *fortification) ; Something is named 'Daumard'. (add object #daumard proper-name "Daumard") ; Daumard possesses the home. (add object *home rel *home-concept possessor *daumard) ^(defineNoun "bartizan")