Download presentation
Presentation is loading. Please wait.
Published byDarlene Mercy Jefferson Modified over 9 years ago
1
Frame-Based Representation Frame: stereotypical knowledge knowledge of some concept. Bird Frame Name Properties CLASS FRAME Tweety Frame Name Properties INSTANCE FRAME
2
Frames Hold Structure and Behavior of a class of objects/concepts Structure properties/data/attributes Behavior methods, rules defining how instances of the class typically behave Generic structure and behavior defines at class level is specified in instances
3
Inheritance Structural and behavioral properties are inherited from super-class to sub-classes subclasses automatically carry the structure an behavior of super-class exception handling (birds fly, but penguins do not) multiple inheritance Birds Bird 1 Bird 2 Robins Canaries Bird 3 Bird 4 Sparrows Bird 6 Bird 5
4
Multiple Inheritance class Bird color eats flies... class Pet name veterinarian... class PetBird color eats flies name veterinarian talks... class Person age weight... class Employee phone# salary... Instance Jack age weight phone# salary
5
Facets provide further information on a property/attribute –define constraints on property value (data type, range of values, etc.) –how to obtain a value for a property (IF-NEEDED method) –what to do if a value changes (IF-CHANGED method)
6
Properties and Facets: Example Object name: Refrigerator Class:Home Appliances - Initialize - from Database - from Procedure - Expert Rules - User specified - by Inheritance - Message passing from other objects
7
Communication between objects Defrost Timer Refrigerator Heating Coil IF-CHANGED methods
8
Rule Interaction with Objects Frame properties as data IF Humans.Legs = 2IF Jack.Legs=2 THEN humans can walkTHEN Jack can walk Modifying a property value IF Jack likes to swim THEN Jacks.Sports = swimming Creating a new instance IF Lucy is mad at Jack because he doesn’t like hiking THEN MAKE Frame Bob Instance-of Humans WITH Sports = Hiking Deleting a frame IF Lucy is really mad at Jack THEN RETRACT Frame Jack
9
JackLucy Bob Humans
10
Pattern Matching ?xx denotes variable Frame ?x instance-of Humans WITH Residence = Pittsburgh WITH Age = ?Age IF Frame ?x instance-of Humans WITH Residence = Pittsburgh WITH Age = ?Age THEN Frame ?x WITH Age = ?Age + 5 IF Frame ?person1 WITH Sex = Male WITH Sports = ?sports1 AND Frame ?person2 WITH Sex = Female WITH Sports = ?sports1 THEN Frame ?person1 WITH Likes = ?person2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.