SlideShare una empresa de Scribd logo
1 de 8
Descargar para leer sin conexión
Module
               8
Other representation
         formalisms
           Version 2 CSE IIT, Kharagpur
Lesson
     21
Frames – II
  Version 2 CSE IIT, Kharagpur
Slots as Objects
How can we to represent the following properties in frames?

    •   Attributes such as weight, age be attached and make sense.
    •   Constraints on values such as age being less than a hundred
    •   Default values
    •   Rules for inheritance of values such as children inheriting parent's names
    •   Rules for computing values
    •   Many values for a slot.

A slot is a relation that maps from its domain of classes to its range of values.

A relation is a set of ordered pairs so one relation is a subset of another.

Since slot is a set the set of all slots can be represent by a metaclass called Slot, say.

Consider the following:


SLOT

                     isa:                 Class

                     instance:                      Class

                     domain:

                     range:

                     range-constraint:

                     definition:

                     default:

                     to-compute:

                     single-valued:




Coach

                     instance:                      SLOT

                     domain:                        Rugby-Team

                     range:                         Person


                                                               Version 2 CSE IIT, Kharagpur
range-constraint:                         (experience x.manager)

                    default:

                    single-valued:                        TRUE

Colour




                    instance:                    SLOT

                    domain:                      Physical-Object

                    range:                       Colour-Set

                    single-valued:                        FALSE

Team-Colours

                    instance:                    SLOT

                    isa:               Colour

                    domain:                      team-player

                    range:                       Colour-Set

                    range-constraint:                     not Pink

                    single-valued:                        FALSE

Position

                    instance:                    SLOT

                    domain:                      Rugby-Player

                    range:                       { Back, Forward, Reserve }

                    to-compute:                      x.position

                    single-valued:                        TRUE




NOTE the following:

   •   Instances of SLOT are slots
   •   Associated with SLOT are attributes that each instance will inherit.


                                                           Version 2 CSE IIT, Kharagpur
•   Each slot has a domain and range.
   •   Range is split into two parts one the class of the elements and the other is a
       constraint which is a logical expression if absent it is taken to be true.
   •   If there is a value for default then it must be passed on unless an instance has its
       own value.
   •   The to-compute attribute involves a procedure to compute its value. E.g. in
       Position where we use the dot notation to assign values to the slot of a frame.
   •   Transfers through lists other slots from which values can be derived

Interpreting frames

A frame system interpreter must be capable of the following in order to exploit the frame
slot representation:

   •   Consistency checking -- when a slot value is added to the frame relying on the
       domain attribute and that the value is legal using range and range constraints.
   •   Propagation of definition values along isa and instance links.
   •   Inheritance of default. values along isa and instance links.
   •   Computation of value of slot as needed.
   •   Checking that only correct number of values computed.

Access Paths

One advantage of a frame based representation is that the (conceptual) objects related to a
frame can be easily accessed by looking in a slot of the frame (there is no need, for
example, to search the entire knowledge-base). We define an access path, in a network of
frames, as a sequence of frames each directly accessible from (i.e. appearing in a slot of)
its predecessor. A sequence of predicates defines an access path iff any variable
appearing as the first argument to a predicate has appeared previously in the sequence.
For example, ``John's parent's sister'' can be expressed in Algernon as the path:



The access path ((parent John ?x) (sister ?x ?y)) is equivalent to the
syntactically similar predicate calculus statement:



In predicate calculus this statement is equivalent to



However, the corresponding sequence of predicates:




                                                             Version 2 CSE IIT, Kharagpur
is not an access path because a query of (sister ?x ?y) requires a search of every
frame in the entire knowledge-base.

Questions
1. Construct semantic network representations for the information below.

a. Richard Nixon is a Quaker and a Republican. Quakers and Republicans are Persons. Every
Quaker every quaker follows the doctrine of pacifism.

b. Mary gave the green flowered vase to her cousin.

2. Consider the following hierarchy of frames.

                   COMPUTER USERS
                    /           |
                   /            |
               ako/             | ako
                 /              |
                /               |
      UNIX USERS             PC USERS              MICROSOFT
                                                   CUSTOMERS
                              /                   /
                             /                   /
                  ako       /ako      ako       /ako
                           /                   /
                          /                   /
                   LINUX USERS            WINDOWS98
                                            USERS
                                        /
                                       /
                          is-a        /is-a
                                     /
                                    /
                                  AMY

a. Give the class-precedence list for Amy that would be obtained by applying the
topological-sorting algorithm to the above graph.

b. Suppose that each of the classes Unix users, PC users and Computer Users contains a
favorite programming language slot. The default value for this slot is:
           o Fortran, for the Computer Users class.
           o C, for the Unix Users class.
           o C++, for the PC Users class.

What is the value obtained for Amy's favorite programming language according to the
class-precedence list you constructed above?




                                                               Version 2 CSE IIT, Kharagpur
Solutions
1.a




1.b




2.a.
             Node                                Fish-hook pairs
       Amy               Amy-Linux Users, Linux Users-Windows98 Users
       Linux Users       Linux Users-Unix Users, Unix Users-PC Users
       Windows98 Users   Windows98 Users-PC Users, PC Users-Microsoft Customers
       Unix Users        Unix Users-Computer Users
       PC Users          PC Users-Computer Users




                                                     Version 2 CSE IIT, Kharagpur
Class Precedence list :

                  Amy
                  Linux Users
                  Unix Users                 - Use C
                  Windows98 Users
                  PC Users                  - Use C++
                  Computer Users             - Use Fortran
                  Microsoft Customers

   1. Amy's favorite programming language is C




                                                       Version 2 CSE IIT, Kharagpur

Más contenido relacionado

Destacado (7)

Lesson 24
Lesson 24Lesson 24
Lesson 24
 
Lesson 23
Lesson 23Lesson 23
Lesson 23
 
Lesson 20
Lesson 20Lesson 20
Lesson 20
 
Lesson 22
Lesson 22Lesson 22
Lesson 22
 
Lesson 28
Lesson 28Lesson 28
Lesson 28
 
Lesson 19
Lesson 19Lesson 19
Lesson 19
 
Lesson 18
Lesson 18Lesson 18
Lesson 18
 

Similar a Lesson 21

Music Recommender Systems
Music Recommender SystemsMusic Recommender Systems
Music Recommender Systemsfuchaoqun
 
There are 37 classes in java.lang package as per Java SE7 The java.pdf
There are 37 classes in java.lang package as per Java SE7 The java.pdfThere are 37 classes in java.lang package as per Java SE7 The java.pdf
There are 37 classes in java.lang package as per Java SE7 The java.pdfaparnatiwari291
 
Deep learning from a novice perspective
Deep learning from a novice perspectiveDeep learning from a novice perspective
Deep learning from a novice perspectiveAnirban Santara
 
Clonewise - Automatically Detecting Package Clones and Inferring Security Vu...
Clonewise  - Automatically Detecting Package Clones and Inferring Security Vu...Clonewise  - Automatically Detecting Package Clones and Inferring Security Vu...
Clonewise - Automatically Detecting Package Clones and Inferring Security Vu...Silvio Cesare
 
Beirut Java User Group JVM presentation
Beirut Java User Group JVM presentationBeirut Java User Group JVM presentation
Beirut Java User Group JVM presentationMahmoud Anouti
 
Tutorial - Support vector machines
Tutorial - Support vector machinesTutorial - Support vector machines
Tutorial - Support vector machinesbutest
 
Tutorial - Support vector machines
Tutorial - Support vector machinesTutorial - Support vector machines
Tutorial - Support vector machinesbutest
 
MLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningMLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningCharles Deledalle
 
Machine Learning with Mahout
Machine Learning with MahoutMachine Learning with Mahout
Machine Learning with Mahoutbigdatasyd
 
Early Experiences with the OpenMP Accelerator Model
Early Experiences with the OpenMP Accelerator ModelEarly Experiences with the OpenMP Accelerator Model
Early Experiences with the OpenMP Accelerator ModelChunhua Liao
 
Chapter 6 data types
Chapter 6 data types Chapter 6 data types
Chapter 6 data types Arafat X
 
KARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live PatchingKARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live PatchingYue Chen
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java introkabirmahlotra
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java introkabirmahlotra
 

Similar a Lesson 21 (20)

Core java
Core javaCore java
Core java
 
Music Recommender Systems
Music Recommender SystemsMusic Recommender Systems
Music Recommender Systems
 
There are 37 classes in java.lang package as per Java SE7 The java.pdf
There are 37 classes in java.lang package as per Java SE7 The java.pdfThere are 37 classes in java.lang package as per Java SE7 The java.pdf
There are 37 classes in java.lang package as per Java SE7 The java.pdf
 
Deep learning from a novice perspective
Deep learning from a novice perspectiveDeep learning from a novice perspective
Deep learning from a novice perspective
 
Clonewise - Automatically Detecting Package Clones and Inferring Security Vu...
Clonewise  - Automatically Detecting Package Clones and Inferring Security Vu...Clonewise  - Automatically Detecting Package Clones and Inferring Security Vu...
Clonewise - Automatically Detecting Package Clones and Inferring Security Vu...
 
Beirut Java User Group JVM presentation
Beirut Java User Group JVM presentationBeirut Java User Group JVM presentation
Beirut Java User Group JVM presentation
 
Tutorial - Support vector machines
Tutorial - Support vector machinesTutorial - Support vector machines
Tutorial - Support vector machines
 
Java14
Java14Java14
Java14
 
Java 7
Java 7Java 7
Java 7
 
JVM
JVMJVM
JVM
 
Tutorial - Support vector machines
Tutorial - Support vector machinesTutorial - Support vector machines
Tutorial - Support vector machines
 
MLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, CaptioningMLIP - Chapter 5 - Detection, Segmentation, Captioning
MLIP - Chapter 5 - Detection, Segmentation, Captioning
 
Machine Learning with Mahout
Machine Learning with MahoutMachine Learning with Mahout
Machine Learning with Mahout
 
SHOGUN使ってみました
SHOGUN使ってみましたSHOGUN使ってみました
SHOGUN使ってみました
 
Understanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual MachineUnderstanding the Dalvik Virtual Machine
Understanding the Dalvik Virtual Machine
 
Early Experiences with the OpenMP Accelerator Model
Early Experiences with the OpenMP Accelerator ModelEarly Experiences with the OpenMP Accelerator Model
Early Experiences with the OpenMP Accelerator Model
 
Chapter 6 data types
Chapter 6 data types Chapter 6 data types
Chapter 6 data types
 
KARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live PatchingKARMA: Adaptive Android Kernel Live Patching
KARMA: Adaptive Android Kernel Live Patching
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
 

Más de Avijit Kumar (14)

Lesson 26
Lesson 26Lesson 26
Lesson 26
 
Lesson 27
Lesson 27Lesson 27
Lesson 27
 
Lesson 29
Lesson 29Lesson 29
Lesson 29
 
Lesson 30
Lesson 30Lesson 30
Lesson 30
 
Lesson 31
Lesson 31Lesson 31
Lesson 31
 
Lesson 32
Lesson 32Lesson 32
Lesson 32
 
Lesson 33
Lesson 33Lesson 33
Lesson 33
 
Lesson 36
Lesson 36Lesson 36
Lesson 36
 
Lesson 35
Lesson 35Lesson 35
Lesson 35
 
Lesson 37
Lesson 37Lesson 37
Lesson 37
 
Lesson 39
Lesson 39Lesson 39
Lesson 39
 
Lesson 38
Lesson 38Lesson 38
Lesson 38
 
Lesson 41
Lesson 41Lesson 41
Lesson 41
 
Lesson 40
Lesson 40Lesson 40
Lesson 40
 

Último

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Último (20)

A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Lesson 21

  • 1. Module 8 Other representation formalisms Version 2 CSE IIT, Kharagpur
  • 2. Lesson 21 Frames – II Version 2 CSE IIT, Kharagpur
  • 3. Slots as Objects How can we to represent the following properties in frames? • Attributes such as weight, age be attached and make sense. • Constraints on values such as age being less than a hundred • Default values • Rules for inheritance of values such as children inheriting parent's names • Rules for computing values • Many values for a slot. A slot is a relation that maps from its domain of classes to its range of values. A relation is a set of ordered pairs so one relation is a subset of another. Since slot is a set the set of all slots can be represent by a metaclass called Slot, say. Consider the following: SLOT isa: Class instance: Class domain: range: range-constraint: definition: default: to-compute: single-valued: Coach instance: SLOT domain: Rugby-Team range: Person Version 2 CSE IIT, Kharagpur
  • 4. range-constraint: (experience x.manager) default: single-valued: TRUE Colour instance: SLOT domain: Physical-Object range: Colour-Set single-valued: FALSE Team-Colours instance: SLOT isa: Colour domain: team-player range: Colour-Set range-constraint: not Pink single-valued: FALSE Position instance: SLOT domain: Rugby-Player range: { Back, Forward, Reserve } to-compute: x.position single-valued: TRUE NOTE the following: • Instances of SLOT are slots • Associated with SLOT are attributes that each instance will inherit. Version 2 CSE IIT, Kharagpur
  • 5. Each slot has a domain and range. • Range is split into two parts one the class of the elements and the other is a constraint which is a logical expression if absent it is taken to be true. • If there is a value for default then it must be passed on unless an instance has its own value. • The to-compute attribute involves a procedure to compute its value. E.g. in Position where we use the dot notation to assign values to the slot of a frame. • Transfers through lists other slots from which values can be derived Interpreting frames A frame system interpreter must be capable of the following in order to exploit the frame slot representation: • Consistency checking -- when a slot value is added to the frame relying on the domain attribute and that the value is legal using range and range constraints. • Propagation of definition values along isa and instance links. • Inheritance of default. values along isa and instance links. • Computation of value of slot as needed. • Checking that only correct number of values computed. Access Paths One advantage of a frame based representation is that the (conceptual) objects related to a frame can be easily accessed by looking in a slot of the frame (there is no need, for example, to search the entire knowledge-base). We define an access path, in a network of frames, as a sequence of frames each directly accessible from (i.e. appearing in a slot of) its predecessor. A sequence of predicates defines an access path iff any variable appearing as the first argument to a predicate has appeared previously in the sequence. For example, ``John's parent's sister'' can be expressed in Algernon as the path: The access path ((parent John ?x) (sister ?x ?y)) is equivalent to the syntactically similar predicate calculus statement: In predicate calculus this statement is equivalent to However, the corresponding sequence of predicates: Version 2 CSE IIT, Kharagpur
  • 6. is not an access path because a query of (sister ?x ?y) requires a search of every frame in the entire knowledge-base. Questions 1. Construct semantic network representations for the information below. a. Richard Nixon is a Quaker and a Republican. Quakers and Republicans are Persons. Every Quaker every quaker follows the doctrine of pacifism. b. Mary gave the green flowered vase to her cousin. 2. Consider the following hierarchy of frames. COMPUTER USERS / | / | ako/ | ako / | / | UNIX USERS PC USERS MICROSOFT CUSTOMERS / / / / ako /ako ako /ako / / / / LINUX USERS WINDOWS98 USERS / / is-a /is-a / / AMY a. Give the class-precedence list for Amy that would be obtained by applying the topological-sorting algorithm to the above graph. b. Suppose that each of the classes Unix users, PC users and Computer Users contains a favorite programming language slot. The default value for this slot is: o Fortran, for the Computer Users class. o C, for the Unix Users class. o C++, for the PC Users class. What is the value obtained for Amy's favorite programming language according to the class-precedence list you constructed above? Version 2 CSE IIT, Kharagpur
  • 7. Solutions 1.a 1.b 2.a. Node Fish-hook pairs Amy Amy-Linux Users, Linux Users-Windows98 Users Linux Users Linux Users-Unix Users, Unix Users-PC Users Windows98 Users Windows98 Users-PC Users, PC Users-Microsoft Customers Unix Users Unix Users-Computer Users PC Users PC Users-Computer Users Version 2 CSE IIT, Kharagpur
  • 8. Class Precedence list : Amy Linux Users Unix Users - Use C Windows98 Users PC Users - Use C++ Computer Users - Use Fortran Microsoft Customers 1. Amy's favorite programming language is C Version 2 CSE IIT, Kharagpur