1 / 20

Knowledge Structures

Knowledge Structures. Building the Perfect Object. Overview. Concepts as Objects, Attributes and Relations What’s a Concept? Concepts, Classes and Instances Inheritance Value Restrictions Default values Specialization/Generalization ISA and Subset Meta-Modeling: Classes and Instances.

delores
Download Presentation

Knowledge Structures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Knowledge Structures Building the Perfect Object Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  2. Overview • Concepts as Objects, Attributes and Relations • What’s a Concept? • Concepts, Classes and Instances • Inheritance • Value Restrictions • Default values • Specialization/Generalization • ISA and Subset • Meta-Modeling: Classes and Instances Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  3. Object, Attributes and Relations Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  4. (O,A,V) Notation • Notation: oav(O, A, V) • oav: object database • O: any object symbol • A: an attribute symbol • V: a value symbol • Semantic Interpretation • O represents a concept, • A a property of that concept and • V a value of the property A of the concept O. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  5. What’s a Concept? Asserts something about a group of individuals (x) telephone(x) ^ oav(x, color, beige) • oav(telephone, color, beige) • ‘telephone’ is an object that denotes the concept telephone • ‘telephone’ has a property color and its value is beige. • Is that enough? Which does the representation really intend? • the concept telephone is beige? • all things that are telephones are beige? • oav(tel_101, instance_of, telephone) • tel_101 is a telephone? • oav(tel_101, color, beige) • Is tel_101 beige? • Is the color attribute interpreted uniformly? • Can color be an object? • Can instance_of be an object? telephone(tel_101) Asserts something about a particular individual Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  6. Classes and Individuals? • A useful interpretation of OAVs requires a distinction between classes & individuals • Individuals • IF an object fact is an assertion about a particular individual, then property values specify the value of that property for that individual • oav(o,a,v): oav(o, a, v) • Classes • IF an object describes a “class” of individuals, THEN property values are intended to describe a class of potential (valid/satisfying) values for any individual of that class • The object in this case denotes an entire set of individuals by describing the set of characteristics true of all individuals in that set. • oav(o_class, a, v_class ): (x) o_class(x) ^ oav(x, a, v) ^ v_class(v) • In our new interpretation, o_class is a predicate, oav just became a 2nd order predicate. What are the implications? Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  7. The Class Assertion • How do we assert that an object should denote a class vs an individual? • This is required to apply the right logical interpretation of a assertion: oav(o,a,v) • Option 1: Special Predicates • class(object) or individual(object) • Not both - we would not know which interpretation to apply • Implies an object is either a class or an individual • This is how OO languages and most KR languages do it. • Do objects that represent classes ever represent individuals? No. • Option 2 • intentional_oav(o, a, v) and extensional_oav(o,a,v) • Objects can have intentional assertions and extensional assertions. • Objects may act as either a class or an individual. • How would this ever be a requirement? If it is what are the implications? Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  8. Instance_of and Inheritance • A relation between concepts - Links individuals to classes • ex_oav(tel_101, instance_of, telephone) • ex_oav(harry, instance_of, eagle) • Facts • in_oav(telephone, color, beige) • ex_oav(te1_101, instance_of, telephone) • The inheritance inference • From the above we would like to infer: ex_oav(tel_101, color, beige) • Requires interpretation of intentional values as values held by all instances not as value classes • (c,x) ex_oav(x, instance_of, c) ^ in_oav(c, a, v)  ex_oav(x, a, v) Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  9. Instance_of and Value Restrictions • in_oav(telephone, color, telephone_color) • (x,v) ex_oav(x, instance_of, telephone)  • ex_oav(x,color,v) ^ v is a telephone_color • v is a telephone_color? We don’t know what we mean by this yet. • ex_oav(te1_101, instance_of, telephone) • tel_101 does not inherit any particular color on this interpretation • How would you accommodate both • Classes as descriptions of common characteristics of all individuals AND • Classes as a source for inherited values • Would we want both? • How would each be used? Recognition. Design. Production. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  10. Inheritance and Value Restriction • Inheritance Inference • (c,x,a) • (ex_oav(x, instance_of, c) ^ in_oav(c, a, v)) •  ex_oav(x, a, v) • Value Restriction Inference • (c,a,v,vc,x,) % c:class, a:attribute, v:value, vc:value class, x:object • in_oav(c, a, vc) • ex_oav(x, instance_of, c)  ex_oav(x,a,v) ^ v is in vc • What do we mean by v is in vc • v is a member of the class vc • v satisifies the value restriction vc • ex_oav(v, instance_of,vc)? • vc(v) where vc is a LP rule? • vc is a list and v is a member? Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  11. Representation of Value Classes • Use same representation scheme • vc is in v • ex_oav(v, instance_of,vc) • ex_oav(beige, instance_of, telephone_color) • Sneak some Prolog • Define telephone_color(X) as a rule that determines if X is a telephone_color. This rule becomes a representation of the potential values. • telephone_color(X)  member(X, [white, black, beige]). • Delivers all the power of PROLOG to express value_class and determine value_class membership. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  12. Value Classes and Inherited Values • User value class interpretation as stated above • Add explicit representation of default values • Proposal 1: Use current primitives • in_oav(telephone, color, telephone_color) • in_oav(telephone, default_color, beige) • Would this work? • Proposal 2: Have value_class representation emit a default value • telephone_color(X) <- X=beige, !. %Default Value • telephone_color(X) <- member(X, [beige, black, white]). %Value Restriction • Proposal 3: Add new explicit primitives to representation • in_oav_default(telephone, color, beige) • Develop inheritance inference to use this relation. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  13. Programming Workshop 0 Implement what an object-based KR language. Included the following features: • Object, Attribute and Values • Getters and Setters • Class and Instances • Inheritance and Default Values • Implement both proposals • Value Restriction Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  14. The IS_A Relation. What does it mean? • Instance_of • eagle is_a bird  eagle instance_of bird? • Harry is_a eagle  harry instance_of eagle? • Set Membership • eagle is_a bird  eagle is a member of the set birds? • eagle is_a bird  eagle is a subset of the set bird? • harry is_a eagle harry is a member? Subset? of the set of all eagles? • Predication (recognition) • eagle is_a bird bird(eagle) – bird is a predicate • eagle satisfies the predicate bird (however it is defined e.g, has wings) • But is eagle a predicate or an individual? • bald_eagle is_a eagle would suggest that eagle is a predicate. Then bird becomes 2nd order • Conceptual Containment (Construction) • eagle is_a bird bird is used to construct an eagle (inheritance, value restrictions etc.) • whatever is asserted true about a bird may be inferred true about all bald eagles. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  15. Mammal Cat Is-a’s Extensional Implication Animal Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  16. The IS_A Inferences • Instance Inclusion • If A is_a B then if x instance_of A then x instance_of B • Transitivity • A is_a B ^ B is_a C  A is_a C • Property and property value inheritance • oav(B,P,V) ^ A is_a B  oav(A,P,V) • What if there are multiple values? • What about subclass overrides • Subsumption • Use attributes and value classes to interpret a class as a predicate. • The predicate would be used to determine membership of individuals. • Given classes A and B (and none of there members) determine if the predicate A is_a B. A is subsumed by B. All A’s instances are B’s instances. Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  17. Meta-Models, Classes & Instances Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  18. Meta^3 Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  19. Programming Project • Implement an object-based representation language to everything in workshop 0 plus: • Default Value Overrides • The is_a relation and its inferences • Multiple Values • Inheritance over layered models (model and meta model) Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

  20. The End An OO modeling system represents a fairly complex default-logic. Do you know the semantics of your OO system? Dr. David A Ferrucci -- Logic Programming and AI Lecture Notes

More Related