Script started on Wed 11 May 2011 11:40:11 PM EDT timberlake {~/Desktop/CVA Spring 2011} > mlisp International Allegro CL Enterprise Edition 8.2 [Linux (x86)] (Jul 9, 2010 16:05) Copyright (C) 1985-2010, Franz Inc., Oakland, CA, USA. All Rights Reserved. This development copy of Allegro CL is licensed to: [4549] University at Buffalo ;; Optimization settings: safety 1, space 1, speed 1, debug 2. ;; For a complete description of all compiler switches given the ;; current optimization settings evaluate (explain-compiler-settings). ;;--- ;; Current reader case mode: :case-sensitive-lower cl-user(1): :ld /projects/snwiz/bin/sneps ; Loading /projects/snwiz/bin/sneps.lisp ;;; Installing streamc patch, version 2. Loading system SNePS...10% 20% 30% 40% 50% 60% 70% 80% 90% 100% SNePS-2.7 [PL:2 2011/04/19 17:07:58] loaded. Type `(sneps)' or `(snepslog)' to get started. cl-user(2): (sneps) Welcome to SNePS-2.7 [PL:2 2011/04/19 17:07:58] Copyright (C) 1984--2010 by Research Foundation of State University of New York. SNePS comes with ABSOLUTELY NO WARRANTY! Type `(copyright)' for detailed copyright information. Type `(demo)' for a list of example applications. 5/11/2011 23:40:35 * (demo "oamDEMOfile.txt") File /home/cendue/divakars/Desktop/CVA Spring 2011/oamDEMOfile.txt is now the source of input. CPU time : 0.00 * ; ======================================================================= ; FILENAME: oamDEMOfile.txt ; DATE: 20-APR-2011 ; PROGRAMMER: DIVAKAR_DEV_SINGH ;; 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 "oamDEMOfile.txt" :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: ^( --> load "/projects/rapaport/CVA/STN2/defun_noun.cl") ; Loading /projects/rapaport/CVA/STN2/defun_noun.cl t CPU time : 0.06 * ; Clear the SNePS network: ^( --> resetnet) Net reset - Relations and paths are still defined CPU time : 0.00 * ; OPTIONAL: ; UNCOMMENT THE FOLLOWING CODE TO TURN FULL FORWARD INFERENCING ON: ; ; ;enter the "snip" package: ^( --> in-package snip) # CPU time : 0.00 * ; ; ;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) # CPU time : 0.00 * ; load all pre-defined relations: ; NB: If "intext" causes a "nil not of expected type" error, ; then comment-out the "intext" command and then ; uncomment & use the load command below, instead ^( --> load "/projects/rapaport/CVA/STN2/demos/rels") ; Loading /projects/rapaport/CVA/STN2/demos/rels t CPU time : 0.00 * (define Skf) (Skf) CPU time : 0.00 * ;^(intext "/projects/rapaport/CVA/STN2/demos/rels") ;^load all pre-defined path definitions: ^( --> intext "/projects/rapaport/CVA/mkb3.CVA/paths/paths") Loading file /projects/rapaport/CVA/mkb3.CVA/paths/paths. before implied by the path (compose before (kstar (compose after- ! before))) before- implied by the path (compose (kstar (compose before- ! after)) before-) after implied by the path (compose after (kstar (compose before- ! after))) after- implied by the path (compose (kstar (compose after- ! before)) after-) sub1 implied by the path (compose object1- superclass- ! subclass superclass- ! subclass) sub1- implied by the path (compose subclass- ! superclass subclass- ! superclass object1) super1 implied by the path (compose superclass subclass- ! superclass object1- ! object2) super1- implied by the path (compose object2- ! object1 superclass- ! subclass superclass-) superclass implied by the path (or superclass super1) superclass- implied by the path (or superclass- super1-) CPU time : 0.00 * ; BACKGROUND KNOWLEDGE: ; ===================== ;Rule 1: Steam is transparent ; ;For all x and y [if x is steam of y -> x is transparent] (describe (assert forall ($x $y) ant(build object *x rel (build lex "steam") possessor *y) cq (build object *x property (build lex "transparent")))) (m3! (forall v2 v1) (ant (p1 (object v1) (possessor v2) (rel (m1 (lex steam))))) (cq (p2 (object v1) (property (m2 (lex transparent)))))) (m3!) CPU time : 0.00 * ;Rule 2: ;The rule in general states that there is a stew that has some oam and that oam has the properties of ;steam i.e. being transparent. But the rule is quiet general and says that anything that is the steam of something ;has the property of being transparent. ; ;x "has steam" z ( pos rel obj) ;z has prop transparent ;x "has oam" v ;v is transparent ;u in oam and is unknown. (describe (assert forall ($x $y $z $u $v $w) &ant (build possessor *x rel *y object *z) &ant (build object *z property *w) &ant (build possessor *x rel *u object *v) &ant (build object *v property *w) &ant (build object *u property (build lex "unknown")) cq (build superclass *y subclass *u))) (m5! (forall v8 v7 v6 v5 v4 v3) (&ant (p7 (object v6) (property (m4 (lex unknown)))) (p6 (object v7) (property v8)) (p5 (object v7) (possessor v3) (rel v6)) (p4 (object v5) (property v8)) (p3 (object v5) (possessor v3) (rel v4))) (cq (p8 (subclass v6) (superclass v4)))) (m5!) CPU time : 0.00 * ;Rule 3: Stew has steam ;this is where I have to use the skolem function as we have encountered an existential quantifier. ;the rule says forall (describe (assert forall $x ant (build member *x class (build lex "stew")) cq (build possessor *x rel (build lex "steam") object (build Skf steamof a1 *x)))) (m7! (forall v9) (ant (p9 (class (m6 (lex stew))) (member v9))) (cq (p11 (object (p10 (Skf steamof) (a1 v9))) (possessor v9) (rel (m1 (lex steam)))))) (m7!) CPU time : 0.00 * ; CASSIE READS THE PASSAGE: ; ========================= ; (put annotated SNePSUL code of the passage here) ;There is a stew that is being cooked by the mother.( cooking not represented ) ;The unknown in this context is the word oam. ;The stew has some oam. ;The oam has the property of being transparent. (describe (add member #mothersstew class (build lex "stew"))) (m11! (object (m9 (Skf steamof) (a1 b1))) (property (m2 (lex transparent)))) (m10! (object (m9)) (possessor b1) (rel (m1 (lex steam)))) (m8! (class (m6 (lex stew))) (member b1)) (m11! m10! m8!) CPU time : 0.02 * (describe (add member #oamofstew class (build lex "oam"))) (m17! (class (m16 (lex oam))) (member b2)) (m17!) CPU time : 0.00 * (describe (add object (build lex "oam") property (build lex "unknown"))) (m18! (object (m16 (lex oam))) (property (m4 (lex unknown)))) (m18!) CPU time : 0.00 * (describe (add object *oamofstew property (build lex "transparent"))) (m19! (object b2) (property (m2 (lex transparent)))) (m19!) CPU time : 0.00 * ;(describe (add object *mothersstew possessor *oamofstew rel steamof)) (describe (add object *oamofstew possessor *motersstew rel (lex "oam"))) (m20! (object b2) (rel lex oam)) (m20!) CPU time : 0.00 * (describe (add object *oamofstew rel (build lex oam) possessor *mothersstew)) (m22! (subclass (m16 (lex oam))) (superclass (m1 (lex steam)))) (m21! (object b2) (possessor b1) (rel (m16))) (m22! m21!) CPU time : 0.01 * ;Describing all the nodes (describe *nodes) (m22! (subclass (m16 (lex oam))) (superclass (m1 (lex steam)))) (m21! (object b2) (possessor b1) (rel (m16))) (m20! (object b2) (rel lex oam)) (m19! (object b2) (property (m2 (lex transparent)))) (m18! (object (m16)) (property (m4 (lex unknown)))) (m17! (class (m16)) (member b2)) (m11! (object (m9 (Skf steamof) (a1 b1))) (property (m2))) (m10! (object (m9)) (possessor b1) (rel (m1))) (m8! (class (m6 (lex stew))) (member b1)) (m7! (forall v9) (ant (p9 (class (m6)) (member v9))) (cq (p11 (object (p10 (Skf steamof) (a1 v9))) (possessor v9) (rel (m1))))) (m5! (forall v8 v7 v6 v5 v4 v3) (&ant (p7 (object v6) (property (m4))) (p6 (object v7) (property v8)) (p5 (object v7) (possessor v3) (rel v6)) (p4 (object v5) (property v8)) (p3 (object v5) (possessor v3) (rel v4))) (cq (p8 (subclass v6) (superclass v4)))) (m3! (forall v2 v1) (ant (p1 (object v1) (possessor v2) (rel (m1)))) (cq (p2 (object v1) (property (m2))))) (m22! m21! m20! lex m19! m18! m17! m16 oam b2 m11! m10! m9 m8! b1 m7! p11 p10 steamof p9 m6 stew v9 m5! p8 p7 m4 unknown p6 p5 p4 p3 v8 v7 v6 v5 v4 v3 m3! p2 m2 transparent p1 m1 steam v2 v1) CPU time : 0.01 * ; Ask Cassie what "oam" means: ^( --> defineNoun 'oam) Definition of oam: Class Inclusions: steam, Possible Properties: transparent, Possessive: stew, nil CPU time : 0.01 * End of /home/cendue/divakars/Desktop/CVA Spring 2011/oamDEMOfile.txt demonstration. CPU time : 0.11 * (lisp) "End of SNePS" cl-user(3): :ex ; Exiting timberlake {~/Desktop/CVA Spring 2011} > exit exit Script done on Wed 11 May 2011 11:41:09 PM EDT