Script started on Tue Dec 12 18:25:19 2006 pollux {~/CSE_663} > acl International Allegro CL Enterprise Edition 8.0 [Solaris] (Jun 30, 2006 12:35) Copyright (C) 1985-2005, 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/shapiro/Sneps/sneps262 ; Loading /projects/shapiro/Sneps/sneps262.cl ; Loading /projects/shapiro/Sneps/Sneps262/load-sneps.lisp ; Loading ; /projects/snwiz/Install/Sneps-2.6.1/load-logical-pathnames.lisp Loading system SNePS...10% 20% 30% 40% 50% 60% 70% 80% 90% 100% SNePS-2.6 [PL:1a 2006/12/04 04:07:47] loaded. Type `(sneps)' or `(snepslog)' to get started. cl-user(2): (snepslog) Welcome to SNePSLOG (A logic interface to SNePS) Copyright (C) 1984--2004 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. : demo emvasally.demo File /home/csdue/tjburns/CSE_663/emvasally.demo is now the source of input. CPU time : 0.06 : ; ======================================================================= ; FILENAME: emvasally.demo ; DATE: Nov 13, 2006 ; PROGRAMMER: TJ Burns ; ; ; Lines beginning with a semi-colon are comments. ; Lines beginning with "^" are Lisp commands. ; Lines beginning with "%" are SNePSUL commands. ; All other lines are SNePSLOG commands. ; ; To use this file: run SNePSLOG; at the SNePSLOG prompt (:), type: ; ; demo "emvasally.demo" av ; ; Make sure all necessary files are in the current working directory ; or else use full path names. ; ======================================================================= ; Set SNePSLOG mode = 3 set-mode-3 Net reset In SNePSLOG Mode 3. Use define-frame . achieve(x1) will be represented by {, } ActPlan(x1, x2) will be represented by {, } believe(x1) will be represented by {, } disbelieve(x1) will be represented by {, } adopt(x1) will be represented by {, } unadopt(x1) will be represented by {, } do-all(x1) will be represented by {, } do-one(x1) will be represented by {, } Effect(x1, x2) will be represented by {, } else(x1) will be represented by {} GoalPlan(x1, x2) will be represented by {, } if(x1, x2) will be represented by {, } ifdo(x1, x2) will be represented by {, } Precondition(x1, x2) will be represented by {, } snif(x1) will be represented by {, } sniterate(x1) will be represented by {, } snsequence(x1, x2) will be represented by {, , } whendo(x1, x2) will be represented by {, } wheneverdo(x1, x2) will be represented by {, } withall(x1, x2, x3, x4) will be represented by {, , , , } withsome(x1, x2, x3, x4) will be represented by {, , , , } CPU time : 0.00 : ; Turn off inference tracing; this is optional. ; If tracing is desired, enter "trace" instead of "untrace": untrace inference Untracing inference. CPU time : 0.00 : ; Clear the SNePS network: clearkb Knowledge Base Cleared CPU time : 0.00 : ; OPTIONAL: ; UNCOMMENT THE FOLLOWING CODE TO TURN FULL FORWARD INFERENCING ON: ; ; ^(cl:load "/projects/rapaport/CVA/STN2/ff") ; Case Frames: ; ===================== ;[[Does(x,y,z)]] = The proposition that agent [[z]] performs the act ; [[y]] in the way given by [[w]]. define-frame Does(nil act way agent) Does(x1, x2, x3) will be represented by {, , } CPU time : 0.00 : ;[[degree-to-which(x,y)]] = The concept of the degree [[y]] to which ; the manner given by [[x]] is specified. define-frame degree-to-which(nil manner degree) degree-to-which(x1, x2) will be represented by {, } CPU time : 0.00 : ;[[MeaningUnknown(x)]] = The proposition that the word [[x]] has an unknown ; meaning. define-frame MeaningUnknown(nil word) MeaningUnknown(x1) will be represented by {} CPU time : 0.00 : ;[[HasProperty(x,y)]] = The proposition that object [[y]] has the ; property [[x]] at time. define-frame HasProperty(nil property object) HasProperty(x1, x2) will be represented by {, } CPU time : 0.00 : ;[[amt-in-units(x,y)]] = The concept of the amount [[x]] given in the ; units of [[y]]. define-frame amt-in-units(nil amount unit) amt-in-units(x1, x2) will be represented by {, } CPU time : 0.00 : ;[[concept-called(x)]] = The concept given by [[x]]. define-frame concept-called(nil lex) concept-called(x1) will be represented by {} CPU time : 0.00 : ;[[Isa(x,y)]] = The proposition that [[x]] is a member of the class [[y]]. define-frame Isa(nil member class) Isa(x1, x2) will be represented by {, } CPU time : 0.00 : ;[[action-wrt(x,y)]] = The act of performing action [[x]] with respect ; to object [[y]]]. define-frame action-wrt(nil action object) action-wrt(x1, x2) will be represented by {, } CPU time : 0.00 : ;[[Before(x,y)]] = The proposition that time [[x]] is before time [[y]] define-frame Before(nil before after) Before(x1, x2) will be represented by {, } CPU time : 0.00 : ;[[TimeInterval(x,y)]] = The proposition that time in the interval given by [[x]] ; is [[y]] define-frame TimeInterval(nil interval dur) TimeInterval(x1, x2) will be represented by {, } CPU time : 0.00 : ;[[EventTime(x,y,z)]] = The proposition that some event or state [[x]] lasts ; for the time interval from [[y]] to [[z]]. define-frame EventTime(nil arg stime etime) EventTime(x1, x2, x3) will be represented by {, , } CPU time : 0.00 : ;[[Has(x,y,z)]] = The proposition that [[x]] is a [[y]] of [[z]]; define-frame Has(nil object rel possessor) Has(x1, x2, x3) will be represented by {, , } CPU time : 0.00 : ; Unconscious (Path) Knowledge: ; ===================== ; Notions about time: ;;; Make Before Transitive define-path before (compose before (kstar (compose after- ! before))). before implied by the path (compose before (kstar (compose after- ! before))) before- implied by the path (compose (kstar (compose before- ! after)) before-) CPU time : 0.00 : ;;; Make After Transitive define-path after (compose after (kstar (compose before- ! after))). after implied by the path (compose after (kstar (compose before- ! after))) after- implied by the path (compose (kstar (compose after- ! before)) after-) CPU time : 0.00 : ; BACKGROUND KNOWLEDGE: ; ===================== ; We need to included information that will help deduce that the young ; firm was lacking financially before the contract. ; 1) If x lands y at time t, then x receives y at time t. all(x,y,w,t)(EventTime(Does(action-wrt(concept-called(land),y),w,x),t,t) => EventTime(Does(action-wrt(concept-called(receive),y),w,x),t,t)). wff3!: all(t,w,y,x)(EventTime(Does(action-wrt(concept-called(land),y),w,x),t,t) => EventTime(Does(action-wrt(concept-called(receive),y),w,x),t,t)) CPU time : 0.01 : ; 2) If x receives y at time t1, then x has y for any future interval (t1,t2) all(x,y,w,z,t1,t2)({EventTime(Does(action-wrt(concept-called(receive),y),w,x),t1,t1), Before(t1,t2), Isa(y,z)} &=> EventTime(Has(y,z,x),t1,t2)). wff4!: all(t2,t1,z,w,y,x)({Isa(y,z),Before(t1,t2),EventTime(Does(action-wrt(concept-called(receive),y),w,x),t1,t1)} &=> {EventTime(Has(y,z,x),t1,t2)}) CPU time : 0.04 : ; 3) If x has a government contract for some time interval t, then x has some money starting for the same interval. all(x,y,z,t1,t2)((EventTime(Has(y,z,x),t1,t2) and Isa(y,concept-called(governmentContract))) => EventTime(Has(some,concept-called(money),x),t1,t2)). wff7!: all(t2,t1,z,y,x)((Isa(y,concept-called(governmentContract)) and EventTime(Has(y,z,x),t1,t2)) => EventTime(Has(some,concept-called(money),x),t1,t2)) CPU time : 0.01 : ; 4) If x has some money during some interval (t1,t2), then x is not struggling during that interval. all(x,t1,t2)(EventTime(Has(some, concept-called(money),x),t1,t2) => EventTime(~HasProperty(concept-called(struggling),x),t1,t2)). wff9!: all(t2,t1,x)(EventTime(Has(some,concept-called(money),x),t1,t2) => EventTime(~HasProperty(concept-called(struggling),x),t1,t2)) CPU time : 0.00 : ; 5) If x has some money and is not struggling at time interval (t2,t3), but x was struggling at time interval (t1,t2), then ; x did not have money during time interval (t1,t2). all(x,t1,t2,t3)({EventTime(Has(some, concept-called(money),x),t2,t3), EventTime(~HasProperty(concept-called(struggling),x),t2,t3),EventTime(HasProperty(concept-called(struggling),firm1),t1,t2), Before(t1,t2)} &=> EventTime(~Has(some, concept-called(money),x),t1,t2)). wff11!: all(t3,t2,t1,x)({Before(t1,t2),EventTime(HasProperty(concept-called(struggling),firm1),t1,t2),EventTime(~HasProperty(concept-called(struggling),x),t2,t3),EventTime(Has(some,concept-called(money),x),t2,t3)} &=> {EventTime(~Has(some,concept-called(money),x),t1,t2)}) CPU time : 0.00 : ; 6) If x does not have y during a time interval (t1,t2), and if x performs an action z in a certain manner w which has an unknown ; meaning, then it can be infered that performing z in the manner w implies that x does not have y for the same interval. ; (This will be our meaning postulate) all(x,y,Y,z,w,D,t1,t2)({EventTime(~Has(y,Y,x),t1,t2), EventTime(Does(z,degree-to-which(w,D),x),t1,t2), MeaningUnknown(w)} &=> (EventTime(Does(z,degree-to-which(w,D),x),t1,t2) => EventTime(~Has(y,Y,x),t1,t2))). wff12!: all(t2,t1,D,w,z,Y,y,x)({MeaningUnknown(w),EventTime(Does(z,degree-to-which(w,D),x),t1,t2),EventTime(~Has(y,Y,x),t1,t2)} &=> {EventTime(Does(z,degree-to-which(w,D),x),t1,t2) => EventTime(~Has(y,Y,x),t1,t2)}) CPU time : 0.01 : ; CASSIE READS THE PASSAGE: ; ========================= ; "After operating slighty emvasally [in the red] for many months, ; the struggling young firm landed a large government contract." ; ; Part 1) "The struggling young firm operated slighty emvasally..." ; Note that we must constraing the struggling property to be in this time period ; since it might not be the case that the firm is always struggling. Isa(firm1, concept-called(Firm))! wff14!: Isa(firm1,concept-called(Firm)) CPU time : 0.04 : HasProperty(concept-called(young), firm1)! wff18!: HasProperty(concept-called(young),firm1) CPU time : 0.01 : EventTime(HasProperty(concept-called(struggling), firm1), time1, time2)! wff19!: EventTime(HasProperty(concept-called(struggling),firm1),time1,time2) CPU time : 0.26 : ; Part 2) "[The struggling young firm] landed a large government contract." Isa(contract1, concept-called(governmentContract))! wff25!: Isa(contract1,concept-called(governmentContract)) CPU time : 0.02 : HasProperty(concept-called(large), contract1)! wff27!: HasProperty(concept-called(large),contract1) CPU time : 0.04 : ; Now to combine parts 1 and 2 we need to introduce a theory of time: ; Use Before/After/Now theory and corresponding case frame. ; ; "Before...(Part 1)...for many months...[After]...(Part 2)." Before(time1,time2)! wff20!: Before(time1,time2) CPU time : 0.04 : Before(time2,now)! wff29!: Before(time1,now) wff28!: Before(time2,now) CPU time : 0.01 : TimeInterval(Before(time1,time2),amt-in-units(concept-called(many), concept-called(months)))! wff33!: TimeInterval(Before(time1,time2),amt-in-units(concept-called(many),concept-called(months))) CPU time : 0.01 : EventTime(Does(concept-called(operate), degree-to-which(concept-called(emvasally), concept-called(slightly)),firm1), time1, time2)! wff39!: EventTime(Does(concept-called(operate),degree-to-which(concept-called(emvasally),concept-called(slightly)),firm1),time1,time2) CPU time : 0.22 : EventTime(Does(action-wrt(concept-called(land),contract1),concept-called(normal),firm1), time2, time2)! wff57!: EventTime(~HasProperty(concept-called(struggling),firm1),time2,now) wff56!: EventTime(Has(some,concept-called(money),firm1),time2,now) wff55!: EventTime(Has(contract1,concept-called(governmentContract),firm1),time2,now) and Isa(contract1,concept-called(governmentContract)) wff54!: EventTime(Has(contract1,concept-called(governmentContract),firm1),time2,now) wff52!: EventTime(Does(action-wrt(concept-called(receive),contract1),concept-called(normal),firm1),time2,time2) wff49!: EventTime(Does(action-wrt(concept-called(land),contract1),concept-called(normal),firm1),time2,time2) wff43!: EventTime(~Has(some,concept-called(money),firm1),time1,time2) CPU time : 0.05 : ; Cassie knows going into this that she does not know the meaning of "emvasally" MeaningUnknown(concept-called(emvasally))! wff58!: EventTime(Does(concept-called(operate),degree-to-which(concept-called(emvasally),concept-called(slightly)),firm1),time1,time2) => EventTime(~Has(some,concept-called(money),firm1),time1,time2) wff43!: EventTime(~Has(some,concept-called(money),firm1),time1,time2) wff40!: MeaningUnknown(concept-called(emvasally)) CPU time : 0.02 : ; Ask Cassie what she now knows: ; =============================== ; We will do this first by asking whether the firm had money before landing the contract ; (ie while operating emvasally) EventTime(~Has(some, concept-called(money),firm1),time1,time2)? wff43!: EventTime(~Has(some,concept-called(money),firm1),time1,time2) CPU time : 0.00 : ; Now we will ask the following question to determine if Cassie has deduced ; a reasonable conclusion about the meaning of emvasally: ; Does operating "emvasally" at a certain time imply a lack of money during that time? (EventTime(Does(concept-called(operate),degree-to-which(concept-called(emvasally),concept-called(slightly)),firm1),time1,time2) => EventTime(~Has(some,concept-called(money),firm1),time1,time2))? wff58!: EventTime(Does(concept-called(operate),degree-to-which(concept-called(emvasally),concept-called(slightly)),firm1),time1,time2) => EventTime(~Has(some,concept-called(money),firm1),time1,time2) CPU time : 0.00 : CPU time : 0.00 : End of /home/csdue/tjburns/CSE_663/emvasally.demo demonstration. script done on Tue Dec 12 18:26:58 2006