; ======================================================================= ; FILENAME: MAUL.demo ; DATE: 11-15-2003 ; PROGRAMMER: Hansheng Lei ; ; To use this file: run SNePS; at the SNePS prompt (*), type: ; ; (demo "MAUL.demo" :av) ; ; ======================================================================= ^(load "/projects/stn2/CVA/defun_noun.cl") ;set trace level ^(setTraceLevel 4) ; Reset the network (resetnet t) ^(in-package snip) ^(defun broadcast-one-report (rep) (let (anysent) (do.chset (ch *OUTGOING-CHANNELS* anysent) (when (isopen.ch ch) (setq anysent (or (try-to-send-report rep ch) anysent))))) nil) ^(in-package sneps) (intext "/projects/stn2/CVA/demos/rels") ; load all pre-defined path definitions: (intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") ;;Backgroud knowledge:if person use X for purpose "pounding" and X is heavy, then x is a kind of hammar (define object property agent act action purpose member class lex) (assert forall $p &ant ( (build object *p property (build lex "Heavy")) (build member (build lex "Person") class (build lex "Human")) (build agent (build lex "Person") act (build action (build lex "Use") object *p purpose (build lex "Pounding"))) ) cq (build subclass *p superclass (build lex "Hammer")) ) ;Represent maul is heavy (assert object (build lex "Maul") property (build lex "Heavy")) ;;Represent 'Person uses Maul for pounding" ;1. "in" the "fence posts" (define preposition position) (assert preposition (build lex "In") position (build lex "Fence_posts")) ;2. "person" is member of "human" (assert member (build lex "Person") class (build lex "Human")) ;3. person use maul for pupose pounding in the fence posts (define location) (assert agent (build lex "Person") act (build action (build lex "Use") object (build lex "Maul") purpose (build lex "Pounding") location (build preposition (build lex "In") position (build lex "Fence_posts")) )) ;; Maul lay unused at his side (define direction status possesor) (assert agent (build lex "Maul") act (build action (build lex "Lay") status (build lex "Unused") location (build preposition (build lex "At") position (build possesor (build lex "Person") direction (build lex "Side"))))) ;Deduce: Is Maul a kind of Hammer? (deduce subclass (build lex "Maul") superclass (build lex "Hammer")) ; Ask Cassie what "Maul" means: ; ========================= ^(defineNoun "Maul")