; ======================================================================= ; FILENAME: sedative2.demo ; PROGRAMMER: Kompalli Suryaprakash ; Lines beginning with a semi-colon are comments. ; Lines beginning with "^" are Lisp commands. ; All other lines are SNePS commands. ;:ld /projects/snwiz/bin/sneps ; To use this file: run SNePS; at the SNePS prompt (*), type: ; ; (demo "sedative2.demo" :av) ; ; Make sure all necessary files are in the current working directory ; or else use full path names. ; ======================================================================= ; Clear the SNePS network: (resetnet t) ; 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") ;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") ; BACKGROUND KNOWLEDGE: ; ===================== ;; Background knowledge suggested by Kompalli ;; (BK01) If FDA grants that people use something x, then x must be either food or drug. ;; Change it to "If object X gets clearance from FDA so that it may be used in people, then object X is food or drug" (assert forall ($x) ant ((build agent *x act (build action (build lex "gets FDA clearance") object (build agent (build lex "Human Being") act (build action (build lex "Use") object *x))))) cq (build min 1 max 2 arg ((build member *x class (build lex "Food")) (build member *x class (build lex "Drug"))))) ;; (BK02) Child is a subclass of human_being. (assert subclass (build lex "Child") superclass (build lex "Human Being")) ;; (BK10) Alleviate is equivalent to relieve. ;(describe (assert equiv((build lex "Alleviate") (build lex "Relieve")))) (describe (assert forall(#anAgent1 #anObject1) ant (build agent *anAgent1 act (build lex "Alleviate") object *anObject1) cq (build agent *anAgent1 act (build lex "Relieve") object *anObject1))) ; CASSIE READS THE PASSAGE: ; ========================= ;; Alternate content proposed by Kompalli: ;; (a) Relief is available for the anxiety children suffer when ;; undergoing difficult medical procedures or facing surgery. ;; The fact that Versed relieves emotion is given as a separate clasue since ;; Versed also relieves emotion when children are not being operated on. (describe (assert forall (#some_emotion #a_child) &ant (build member *a_child class (build lex "Child")) &ant (build member *some_emotion class (build lex "Anxiety")) ant ((build agent *a_child act (build action (build lex "Face") object (build lex "Surgery"))) (build agent *a_child act (build action (build lex "Face") object (build lex "Difficult Medical Procedure")))) cq ((build agent *a_child act (build action (build lex "Suffer") object (*some_emotion)))))) (describe (assert agent (build lex "Versed") act (build action (build lex "Relieve") object (*some_emotion)))) ;; (a) The medication, Versed(R) (midazolam HCl), can be used to calm and sedate children who must ;; undergo procedures such as bone-marrow aspiration or spinal tap. (describe (build member #operating_child class (build lex "Child")) (assert agent (build lex "Versed") act (build action (build lex "Calm") object *operating_child)) (assert agent *operating_child act (build action (build lex "Undergo") object (build lex "Bone Marrow Aspiration")))) ;; (b) The U.S. Food and Drug Administration (FDA) granted marketing ;; clearance today to a sedative for use in children. (describe (assert agent (build lex "Versed") act (build action (build lex "gets FDA clearance") object (build agent (build lex "Child") act (build action (build lex "Use") object (build lex "Versed")))))) ; as well as to allow the child to forget what happened during the period of sedation; ; Not the best way to represent this. (describe (assert agent (build lex "Versed") act (build action (build lex "Allows") object (build agent (build lex "Child") act (build action (build lex "Forget") object (build lex "Sedation")))))) ;; (o) Versed is a drug. (describe (assert member (build lex "Versed") class (build lex "Drug"))) ;; (q) Versed is a sedative. (describe (assert member (build lex "Versed") class (build lex "Sedative"))) ;; (r1) It can be used as a light sedative to help alleviate a child's anxiety. (describe (assert agent (build lex "Versed") act (build action (build lex "Alleviate") object (build lex "Anxiety")))) ^(defineNoun "Sedative")