Page 119 - DCAP310_INTRODUCTION_TO_ARTIFICIAL_INTELLIGENCE_AND_EXPERT_SYSTEMS
P. 119

Unit 6: Formalized Symbolic Logics




               tms-create-node (jtms datum assumptionp contradictoryp) creates a sentence node. The  Notes
               parameters are:

                    jtms, the jtms within which the sentence node is to be created
                    datum, the sentence
                    assumptionp, true if this is an assumption node; initially the assumption is retracted
                    contradictoryp, true if this is a contradictory node
               Note that premise nodes are recognised because they are given a justification without any
               premises.
               enable-assumption (node), retract-assumption (node). These functions respectively enable
               and retract an existing assumption node.
               justify-node (informant conclusion-node list-of-premise-nodes), creates a justification
               node. The parameters are:

                    The informant, that is who/what is entering this justification
                    The conclusion-node and list-of-premise-nodes that specify respectively the
                    conclusion and the premises of this justification.

          Here is a simple dependency network:
                         contradiction
                               |
                               x
                               |
                          g o     o h
                            |     |
                            x     x
                           / \   / \
                          /   \ /   \
                         o     o     o
                         A     C     E
             This network is created:
                 (setq *jtms* (create-jtms “Forbus-deKleer example on page 181”))
             The nodes A, C, E are created and enabled:
                 (setq assumption-a (tms-create-node *jtms* “A” :assumptionp t)
                       assumption-c (tms-create-node *jtms* “C” :assumptionp t)
                         assumption-e (tms-create-node *jtms* “E” :assumptionp t))
                 (enable-assumption assumption-a)
                 (enable-assumption assumption-c)
                 (enable-assumption assumption-e)
             The node h is created and justified:
                 (setq node-h (tms-create-node *jtms* “h”))
                 (justify-node “R1” node-h (list assumption-c assumption-a))
                             ;; R1 is the  informant for this
                            ;; justification
            The node g is created, justified, and established as a contradiction:
                 (setq node-g (tms-create-node *jtms* “g”))
                 (justify-node “R2” node-g (list assumption-a assumption-c))
                 (setq contradiction (tms-create-node *jtms* ‘contra
            :contradictoryp t))
                 (justify-node “R3” contradiction (list node-g))
            This last command will recognise that a contradiction exists and will
            invoke a contradiction handler that should state that the node
            “contradiction” is a contradiction and that some of the assumptions
            in {A, C} should be retracted.
          Here should be a larger dependency network as used in a JTMS.





                                           LOVELY PROFESSIONAL UNIVERSITY                                   113
   114   115   116   117   118   119   120   121   122   123   124