Docsity

Frame Based Representation Languages, Study Guides, Projects, Research of Object Oriented Programming

Toggle sidebar
bg1
1
1
Frame Based
Frame Based
Representation
Representation
Languages
Languages
2
Frame languages
Typical characteristics include
• OO representation languages
• Class - subclass taxonomies
• Prototype descriptions of class instances
• Frame KR language performs standard inferences:
– inheritance of attributes, constraints and values
– type checking of attribute values
– checking number of attribute values
3
Historical Perspective
• Frame based KR systems were first developed in the mid 70’s
• A seminal paper was
–A Framework for Representing Knowledge, Marvin Minsky, MIT-AI
Laboratory Memo 306, June, 1974.
–http://web.media.mit.edu/~minsky/papers/Frames/frames.html
• It dealt more a new approach to organizing and using knowledge
using stereotypical instances than a KR system or language.
Here is the essence of the theory: When one encounters a new situation (or
makes a substantial change in one's view of the present problem) one selects
from memory a structure called a Frame. This is a remembered framework to
be adapted to fit reality by changing details as necessary. A frame is a data-
structure for representing a stereotyped situation, like being in a certain kind
of living room, or going to a child's birthday party. Attached to each frame
are several kinds of information. Some of this information is about how to use
the frame. Some is about what one can expect to happen next. Some is about
what to do if these expectations are not confirmed.
4
Historical Perspective
• Inspired by Minsky’s vision as well as OO ideas in the wind
(from Simula and Smalltalk) many researchers developed
new OO AI representation systems
•FRL: Frame Representation Language, The FRL Primer, R.
Bruce Roberts and Ira P. Goldstein, AI memo 408, July 1977,
ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-
408.ps
•KRL: D.G. Bobrow and T. Winograd. An Overview of KRL
A Knowledge Representation Language. Cognitive Science,
1:3 -- 46, 1977.
•KL-ONE: Knowledge Language One (~1980)
•LOOPS (Xerox) Lisp Object-Oriented Programming System,
"The LOOPS Manual", Bobrow & Stefik, Xerox Corp 1983
•KEE: Knowledge Engineering Environment, Teknowledge
(~83)
pf3
pf4
pf5

Partial preview of the text

Download Frame Based Representation Languages and more Study Guides, Projects, Research Object Oriented Programming in PDF only on Docsity!

1

Frame Based^ Frame BasedRepresentationRepresentationLanguagesLanguages

Frame languages

Typical characteristics include • OO representation languages• Class - subclass taxonomies• Prototype descriptions of class instances• Frame KR language performs standard inferences:– inheritance of attributes, constraints and values– type checking of attribute values– checking number of attribute values

3

Historical Perspective

  • Frame based KR systems were first developed in the mid 70’s• A seminal paper was– A Framework for Representing Knowledge, Marvin Minsky, MIT-AILaboratory Memo 306, June, 1974.^ – http://web.media.mit.edu/~minsky/papers/Frames/frames.html • It dealt more a new approach to organizing and using knowledgeusing stereotypical instances than a KR system or language.Here is the essence of the theory: When one encounters a new situation (ormakes a substantial change in one's view of the present problem) one selectsfrom memory a structure called a Frame. This is a remembered framework tobe adapted to fit reality by changing details as necessary. A frame is a data-structure for representing a stereotyped situation, like being in a certain kindof living room, or going to a child's birthday party. Attached to each frameare several kinds of information. Some of this information is about how to usethe frame. Some is about what one can expect to happen next. Some is aboutwhat to do if these expectations are not confirmed.

Historical Perspective

  • Inspired by Minsky’s vision as well as OO ideas in the wind(from Simula and Smalltalk) many researchers developednew OO AI representation systems•^ FRL

: Frame Representation Language, The FRL Primer, R.

Bruce Roberts and Ira P. Goldstein, AI memo 408, July 1977,ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-408.ps• KRL

: D.G. Bobrow and T. Winograd. An Overview of KRL

A Knowledge Representation Language. Cognitive Science,1:3 -- 46, 1977.• KL-ONE

: Knowledge Language One (~1980)

-^ LOOPS

(Xerox) Lisp Object-Oriented Programming System,

"The LOOPS Manual", Bobrow & Stefik, Xerox Corp 1983• KEE

: Knowledge Engineering Environment, Teknowledge

5

Example Class-Subclass Taxonomy

Example Class Frame

7

Example Instance Frame

Frames and Own Slots

-^ Frame - Logical Constant– Object, Relation, Function -^ Own Slot - Binary relation– A frame has a set of own slots– An own slot has a set of values at a frame– Semantics:•^ OKBC: Own slot S has value V at frame F•^ KIF: (S F V) -^ Example

FredFavorite-Food: Broccoli Salsa– KIF Translation•^ (Favorite-Food Fred Broccoli)•^ (Favorite-Food Fred Salsa)

13

Example Class Frame and Instance Male-Person

Fred

*Gender: Male

Instance-Of: Male-PersonGender:

Male

(Note: “*” denotes template slot.^ Italics

denotes inferred value.) KIF Translation^ (Template-Slot-Value Gender Male-Person Male)(Instance-Of Fred Male-Person) Inference:

(Gender Fred Male)

Template Facets

  • A template slot at a class frame has a set of template facets• A template facet at a template slot at a class frame has values• Describes own facet values at each instance of the class• Semantics:– OKBC: Template facet Fa has value V at template slot S at class frame Fr– KIF: (Template-Facet-Value Fa S Fr V)• Template facet values inherit to subclasses and instances(=> (Template-Facet-Value ?F ?S ?C ?V)

(and (=> (Instance-Of ?I ?C) (holds ?F ?S ?I ?V))(=> (Subclass-Of ?Csub ?C)

(Template-Facet-Value ?F ?S ?Csub ?V))))

15

Example Class Frame and Instance Male-Person

Fred

*Gender: Male

Instance

-^ Of: Male

Person*Age:^

Gender:

Male

Unit: Year

Age:Unit:

Year

KIF Translation(Template

-^ Slot

  • Value Gender Male -^ Person Male)

(Template

-^ Facet-

Value Unit Age Male

-^ Person Unit)

(Instance

-^ OfFred Male -^ Person)

Inferences(Gender Fred Male)(Unit Age Fred Year)

Value-Type Facet

  • A type restriction on the values of a slot of a frame E.g.,

FredFavorite-Food: Broccoli Salsa

Value-Type: Human-Food

-^ (=> (Value -^ Type ?S ?F ?C) (Class ?C) (=> (holds ?S ?F ?V) (Instance -^ Of?V ?C)))) -^ (=> (Template -^ Facet -^ Value Value -^ Type ?S ?F ?C) (Class ?C)

(=> (Template

-^ Slot -^ Value ?S ?F ?V)

(Instance

-^ Of?V ?C)))) -^ (= (Class -^ Of@i) (setofall (list ?x) (list -^ member ?x (listof @i))))

17

Example Class Frame and Instance

-^ Male -^ Person

X^ Fred

*Gender: Male

Instance-Of: Male-Person

Value-Type: Gender

Gender:

Male

*Age^

Value-Type:

Gender

Unit: Year

Age:

Value-Type: Integer

Unit:^

Year

*Parent:

Value-Type:

Integer

Value-Type: Person

Parent: EarlValue-Type:

Person

X^ EarlInstance-Of:

Person

Example Value-Type Inferences

KIF Translation^ (Template-Facet-Value Value-Type Gender Male-Person Gender)(Template-Facet-Value Value-Type Age Male-Person Integer)(Template-Facet-Value Value-Type Parent Male-Person Person) Axioms^ (=> (Template-Facet-Value Value-Type ?S ?F ?C) (Class ?C)

(=> (Template-Slot-Value ?S ?F ?V) (Instance-Of ?V ?C)))) (=> (Value-Type ?S ?F ?C) (Class ?C)

(=> (holds ?S ?F ?V) (Instance-Of ?V ?C)))) Example inferences^ (Instance-Of Male Gender)(=> (Template-Slot-Value Age Male-Person ?V) (Integer ?V))(Instance-Of Person Earl)

19

Cardinality Facets

Specifies the number of values a slot may have at a frame^ (=> (Slot-Cardinality ?S ?F ?N)

(=^ (Cardinality (setofall ?V (holds ?S ?F ?V)))

?N))

(=> (Template-Facet-Value Slot-Cardinality ?S ?F ?N)

(=< (Cardinality

(setofall ?V (Template-Slot-Value ?S ?F ?V)) ?N))) Similar definitions for -^ – Minimum-Slot-CardinalityAt least that number of values– Maximum-Slot-CardinalityAt most that number of values

Example Class Frame and Instance

-^ Male -^ Person

X^ Fred

*Gender: Male

Instance-Of: Male-Person

Value-Type: Gender

Gender:

Male

Slot-Cardinality: 1

Value-Type:

Gender

*Age^

Slot-Cardinality:

^1

Unit: Year

Age:

Value-Type: Integer

Unit:^

Year

Slot-Cardinality: 1

Value-Type:

Integer

*Parent:

Slot-Cardinality:

^1

Value-Type: Person

Parent:

Slot-Cardinality: 2

Value-Type:

Person Slot-Cardinality:

^2

25

Example Class Frame and Instance • Male-^ Person *Gender: MaleValue

-^ Type: Gender Slot-^

Cardinality: 1 *AgeUnit: YearValue

-^ Type: Integer Slot-^

Cardinality: 1 *Parent:Value

-^ Type: Person Slot-^

Cardinality: 2 Inverse: ChildSubset

-^ Of-

Values: (Child Grandparent

)

  • FredInstance -^ Of: Male -^ Person

…Parent: EarlValue

-^ Type:

Person Slot-^

Cardinality:

^2

Inverse:

Child Subset

-^ Of-

Values: (Child Grandparent) Child: David

  • EarlChild:

Fred

  • DavidGrandparent:

Earl Parent:

Fred

Decompositions

A decomposition is a set of subclasses of a class^ E.g., {Adult Student} is a decomposition of People(<=> (Decomposition ?c ?s)

(and (class ?c) (set ?s) (=> (member ?x ?s) (Subclass-Of ?x ?c)))) E.g., Person

Decomposition: (set-of Adult Student) Exhaustive decomposition^ – All instances of the class are also instances of one of the subclassesin the decomposition– (<=> (Exhaustive-Decomposition ?c ?s)

(and (Decomposition ?c ?s)(=> (Instance-Of ?x ?c)

(exists ?sub (and (member ?sub ?s)

(Instance-Of ?x ?sub))))))

E.g., Person

Exhaustive-Decomposition: (set-of Adult Student Preschool-Child)

27

Decompositions

Disjoint decomposition^ – An object cannot be an instance of more than one of the subclasses in the decomposition– Axiom:

(<=> (Disjoint-Decomposition ?c ?s)(and (Decomposition ?c ?s)

(=> (member ?x ?s) (member ?y ?s) (/= ?x ?y) (Instance-Of ?i ?x)(not (Instance-Of ?i ?y)))))

E.g., Person

Disjoint-Decomposition: (set-of Adult Preschool-Child)VehicleDisjoint-Decomposition: (set-of Automobile Bicycle) Partition^ – An exhaustive disjoint decomposition– Axiom:

(<=> (Partition ?c ?s)(and (Exhaustive-Decomposition ?c ?s) (Disjoint-Decomposition ?c ?s))) E.g., Person

Disjoint-Decomposition: (set-of Adult Child)ThingPartition: (set-of Tangible-Object Intangible-Object)

Frame Based Frame Based

Representation LanguagesRepresentation Languages

The EndThe End