Frame-Based Representation - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

Frame-Based Representation

Description:

(birds fly, but penguins do not) multiple inheritance. Birds. Bird1. Bird2 ... WITH Residence = Pittsburgh. WITH Age = ?Age. IF Frame ?x. instance-of Humans ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 11
Provided by: sidb
Learn more at: http://www.uic.edu
Category:

less

Transcript and Presenter's Notes

Title: Frame-Based Representation


1
Frame-Based Representation
  • Frame stereotypical knowledge knowledge of some
    concept.

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

4
Multiple Inheritance
5
Facets
  • 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
IF-CHANGED methods
Defrost Timer
Refrigerator
Heating Coil
8
Rule Interaction with Objects
  • Frame properties as data
  • IF Humans.Legs 2 IF Jack.Legs2
  • THEN humans can walk THEN 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 doesnt 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
Humans
Bob
Jack
Lucy
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
Write a Comment
User Comments (0)
About PowerShow.com