Script started on Sun Feb 08 16:44:18 2004 castor/S04> acl International Allegro CL Enterprise Edition 6.2 [Solaris] (Oct 28, 2003 9:00) Copyright (C) 1985-2002, Franz Inc., Berkeley, CA, USA. All Rights Reserved. This development copy of Allegro CL is licensed to: [4549] SUNY/Buffalo, N. Campus ;; 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 Loading system SNePS...10% 20% 30% 40% 50% 60% 70% 80% 90% 100% SNePS-2.6 [PL:0a 2002/09/30 22:37:46] loaded. Type `(sneps)' or `(snepslog)' to get started. cl-user(2): (sneps) Welcome to SNePS-2.6 [PL:0a 2002/09/30 22:37:46] Copyright (C) 1984--2002 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. 2/8/2004 16:44:57 * (demo "sneps-passage.demo") File /web/faculty/rapaport/740/S04/sneps-passage.demo is now the source of input. CPU time : 0.02 * ; ======================================================================== ; SNePS representation of: ; ; (1) Pat knows Mike's telephone number. ; (2) He dialed it. ; (3) Pat doesn't know Mary's telephone number, ... ; (4) ...but Mary's number is the same as Mike's number. ; (5) [a node-based rule that allows SNePS/Cassie to infer that Pat ; *dialed* Mary's telephone number but that will *not* allow ; SNePS/Cassie to infer that Pat *knows* Mary's telephone number.] ; ======================================================================== ; First, we define some SNePS relations: (define agent act action object member class lex propername mod head rel possessor equiv) act is already defined. action is already defined. (agent act action object member class lex propername mod head rel possessor equiv) CPU time : 0.01 * ; 1. Pat knows Mike's telephone number. ; 1a. Something has the proper name "Pat" (describe (assert object #pat propername "Pat")) (m1! (object b1) (propername Pat)) (m1!) CPU time : 0.00 * ; unrepresented background knowledge (UBK): ; - "John" is typically the name of a human (of unknown sex!) ; 1b. Something has the proper name "Mike" (describe (assert object #mike propername "Mike")) (m2! (object b2) (propername Mike)) (m2!) CPU time : 0.00 * ; UBK: "Mike" is typically the name of a *male* human ; 1c. Something is Mike's telephone number. (describe (assert object #MIKEtelnum rel (build lex "telephone\ number") = istelnumof possessor *mike)) (m4! (object b3) (possessor b2) (rel (m3 (lex telephone number)))) (m4!) CPU time : 0.01 * ; Note: "istelnumof" will be a SNePSUL variable containing the node ; that represents the relation "is a telephone number of"; ; we'll need to point to this node later, so storing it in a ; SNePSUL variable now renders it unnecessary to re-build it later. ; ; UBK: information about telephones, their numbers ; more detailed representation of "telephone number" ; 1d. Pat knows Mike's telephone number. (describe (assert agent *pat act (build action (build lex "know") = know-action object *MIKEtelnum))) (m7! (act (m6 (action (m5 (lex know))) (object b3))) (agent b1)) (m7!) CPU time : 0.01 * ; 2. He dialed it. (describe (assert agent *pat act (build action (build lex "dial") = dial-action object *MIKEtelnum))) (m10! (act (m9 (action (m8 (lex dial))) (object b3))) (agent b1)) (m10!) CPU time : 0.00 * ; UBK: temporal information (past tense) ; ; Notes: ; (a) Inference is needed to determine that "he" is "Pat" ; and that "it" is Mike's telephone number; this can ; be supplied by our pronoun-resolution algorithm: ; See: Li, Naicong (1986), "Pronoun Resolution in SNePS", ; SNeRG Technical Note 18, ; (Buffalo: UB Department of Computer Science), ; ; (b) This inference also tells us that Pat is male. ; 3. Pat doesn't know Mary's telephone number, ... ; 3a. Something has the proper name "Mary". (describe (assert object #mary propername "Mary")) (m11! (object b4) (propername Mary)) (m11!) CPU time : 0.00 * ; 3b. Something is Mary's telephone number. (describe (assert object #MARYtelnum rel *istelnumof possessor *mary)) (m12! (object b5) (possessor b4) (rel (m3 (lex telephone number)))) (m12!) CPU time : 0.00 * ; 3c. Pat doesn't know Mary's telephone number. ; i.e., it is not the case that Pat knows Mary's telephone number. (describe (assert min 0 max 0 arg (build agent *pat act (build action *know-action object *MARYtelnum)))) (m15! (min 0) (max 0) (arg (m14 (act (m13 (action (m5 (lex know))) (object b5))) (agent b1)))) (m15!) CPU time : 0.01 * ; 4. ...but Mary's number is the same as Mike's number. ; All of Cassie's beliefs are implicitly conjoined, ; so there's no need to represent "but". ; If necessary, that can be done using "andor" ; (Recall that, from a logical point of view, "and" and "but" ; are synonymous; i.e., they have the same truth table. ; They are *pragmatically* different, of course; for some ; discussion, see Segal et al. 19xx.) (describe (assert equiv *MARYtelnum equiv *MIKEtelnum)) (m16! (equiv b5 b3)) (m16!) CPU time : 0.00 * ; 5. Rule allowing inference that Pat dialed *MARYtelnum ; but blocking inference that Pat knows *MARYtelnum ; One way to allow the inference that Pat dialed Mary's ; number even though he doesn't know it in such a way ; that we also don't infer that Pat knows it is to categorize ; verbs as "transparent" (allowing the inference; these will ; usually be physical-action verbs) and "opaque" (not allowing ; the inference; these will usually be mental-action verbs). ; For discussion, see the "SNePS and Intensionality" website, ; . ; First, let's categorize "dial" as a transparent verb: (describe (assert member *dial-action class (build mod (build lex "transparent") head (build lex "verb")) = transparent-class ) ) (m20! (class (m19 (head (m18 (lex verb))) (mod (m17 (lex transparent))))) (member (m8 (lex dial)))) (m20!) CPU time : 0.01 * ; Notes: ; (a) I didn't need to introduce the "mod-head" case frame ; (I could have just used an expression "transparent\ verb", ; leaving its analysis for another time [this is good top-down ; design/stepwise analysis technique, also known as "procrastination"], ; but I wanted to introduce that case frame, since I think you'll ; find it useful. ; ; (b) Arguably, this information should be stored in the lexicon entry ; for "dial". This is a matter for future research, when we have ; a working grammar. ; Now for the rule: ; If an agent performs an action w.r.t. some object, ; & that action is transparent ; & and some other (i.e., intensionally distinct) ; object is (extensionally) equivalent to the ; first object, ; then the agent performs the action w.r.t. that other object, too. (describe (assert forall ($agt $actn $obj1 $obj2) &ant (build agent *agt act (build action *actn object *obj1)) &ant (build member *actn class *transparent-class) &ant (build equiv *obj1 equiv *obj2) cq (build agent *agt act (build action *actn object *obj2)))) (m21! (forall v4 v3 v2 v1) (&ant (p4 (equiv v4 v3)) (p3 (class (m19 (head (m18 (lex verb))) (mod (m17 (lex transparent))))) (member v2)) (p2 (act (p1 (action v2) (object v3))) (agent v1))) (cq (p6 (act (p5 (action v2) (object v4))) (agent v1)))) (m21!) CPU time : 0.02 * ; To test this rule, we can ask Cassie if Pat dials Mary's number ; and if Pat knows Mary's number. She should infer that Pat dials ; it, but she should not infer that Pat knows it; the latter will ; be shown by Cassie being silent, which is her way of indicating ; that she does not know whether Pat knows it. ; Who dials what? (describe (deduce agent $who act (build action *dial-action object $what))) I wonder if ((p8 (act (p7 (action (m8 (lex (dial)))) (object v6))) (agent v5))) holds within the BS defined by context default-defaultct I know ((m10! (act (m9 (action (m8 (lex (dial)))) (object (b3)))) (agent (b1)))) I wonder if ((p4 (equiv v4 v3))) holds within the BS defined by context default-defaultct I wonder if ((p3 (class (m19 (head (m18 (lex (verb)))) (mod (m17 (lex (transparent)))))) (member (v2 <-- m8)))) holds within the BS defined by context default-defaultct I wonder if ((p2 (act (p1 (action (v2 <-- m8)) (object v3))) (agent v1))) holds within the BS defined by context default-defaultct I know ((m16! (equiv (b5) (b3)))) I know ((m20! (class (m19 (head (m18 (lex (verb)))) (mod (m17 (lex (transparent)))))) (member (m8 (lex (dial)))))) I know ((m10! (act (m9 (action (m8 (lex (dial)))) (object (b3)))) (agent (b1)))) Since ((m21! (forall (v4 <-- b5) (v3 <-- b3) (v2 <-- m8) (v1 <-- b1)) (&ant (p4 (equiv (v4 <-- b5) (v3 <-- b3))) (p3 (class (m19 (head (m18 (lex (verb)))) (mod (m17 (lex (transparent)))))) (member (v2 <-- m8))) (p2 (act (p1 (action (v2 <-- m8)) (object (v3 <-- b3)))) (agent (v1 <-- b1)))) (cq (p6 (act (p5 (action (v2 <-- m8)) (object (v4 <-- b5)))) (agent (v1 <-- b1)))))) and ((p4 (equiv (v4 <-- b5) (v3 <-- b3)))) and ((p3 (class (m19 (head (m18 (lex (verb)))) (mod (m17 (lex (transparent)))))) (member (v2 <-- m8)))) and ((p2 (act (p1 (action (v2 <-- m8)) (object (v3 <-- b3)))) (agent (v1 <-- b1)))) I infer ((p6 (act (p5 (action (v2 <-- m8)) (object (v4 <-- b5)))) (agent (v1 <-- b1)))) (m23! (act (m22 (action (m8 (lex dial))) (object b5))) (agent b1)) (m10! (act (m9 (action (m8)) (object b3))) (agent b1)) (m23! m10!) CPU time : 0.07 * ; Who knows what? (describe (deduce agent $who2 act (build action *know-action object $what2))) I wonder if ((p14 (act (p13 (action (m5 (lex (know)))) (object v8))) (agent v7))) holds within the BS defined by context default-defaultct I know ((m7! (act (m6 (action (m5 (lex (know)))) (object (b3)))) (agent (b1)))) I know it is not the case that ((m14 (act (m13 (action (m5 (lex (know)))) (object (b5)))) (agent (b1)))) I wonder if ((p3 (class (m19 (head (m18 (lex (verb)))) (mod (m17 (lex (transparent)))))) (member (v2 <-- m5)))) holds within the BS defined by context default-defaultct I wonder if ((p2 (act (p1 (action (v2 <-- m5)) (object v3))) (agent v1))) holds within the BS defined by context default-defaultct I know ((m7! (act (m6 (action (m5 (lex (know)))) (object (b3)))) (agent (b1)))) (m15! (min 0) (max 0) (arg (m14 (act (m13 (action (m5 (lex know))) (object b5))) (agent b1)))) (m7! (act (m6 (action (m5)) (object b3))) (agent b1)) (m15! m7!) CPU time : 0.04 * ; Syntax & Semantics of New Case Frame: ; -------------------------------------- ; m: mod x head y ; [[m]] = a structured individual that is a [[y]] modified by [[x]] ; ; UBK for the obj-rel-poss case frame: ; - if x is y's z, then x is a z End of /web/faculty/rapaport/740/S04/sneps-passage.demo demonstration. CPU time : 0.22 * (lisp) "End of SNePS" cl-user(3): :ex ; Exiting Lisp castor/S04> exit exit script done on Sun Feb 08 16:47:19 2004