; ======================================================================= ; FILENAME: Impasse.demo ; DATE: 11-15-2004 ; PROGRAMMER: Rashmi Mudiyanur ;; template.demo.2003.11.17.txt ; Lines beginning with a semi-colon are comments. ; Lines beginning with "^" are Lisp commands. ; All other lines are SNePS commands. ; ; To use this file: run SNePS; at the SNePS prompt (*), type: ; ; (demo "Impasse.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 "/projects/rapaport/CVA/STN2/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") ;defining the relations not found in the rels (define isa mod head) ; BACKGROUND KNOWLEDGE: ; ===================== ; (put annotated SNePSUL code of your background knowledge here) ;RULE1: If all chances for agreement are gone, then Disagreement has been reached (describe (assert ant (build forall ($x $A) &ant (build member *A class (build lex "agreement") ) &ant (build possessor *A rel (build lex "chances") object *x) cq (build object *x property (build lex "gone"))) cq (build object (build lex "disagreement") property (build lex "reached") ) ) ) ;RULE2: If compromise is impossible then Disagreement has been reached. (describe (assert forall ($x $y) &ant (build member *x class (build lex "compromise") ) &ant (build object *x property (build lex "impossible") ) cq (build object (build lex "disagreement") property (build lex "reached") ) ) ) ;RULE3: If X is reached and Y is reached and Y is unknown, then Y is X. (describe (assert forall ($x $y) &ant (build object *x property (build lex "reached") ) = r1 &ant (build object *y property (build lex "reached") ) = r2 &ant (build object *y property (build lex "unknown") ) &ant (build thresh 2 arg *r1 arg *r2) cq (build subclass *y superclass *x) ) ) ; CASSIE READS THE PASSAGE: ; ========================= ; (put annotated SNePSUL code of the passage here) (describe (add forall ($x $A) &ant (build member #A class (build lex "agreement") ) &ant (build possessor *A rel (build lex "chances") object *x) cq (build object *x property (build lex "gone") ) ) = arg1) (describe (add member #c class (build lex "compromise") ) ) (describe (add object *c property (build lex "impossible") ) = arg2) (describe (add member #I class (build lex "impasse") ) ) (describe (add object *I property (build lex "unknown") ) ) (describe (add mod (build lex "in short") head (add object *I property (build lex "reached") ) = arg3) ) (describe (add thresh 3 arg *arg1 arg *arg2 arg *arg3) ) ; Ask Cassie what "Impasse" means: ; UNCOMMENT THE ONE YOU *DO* WANT ; AND DELETE THE OTHER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ^(defineNoun "impasse")