objects
DESCRIPTION
Objects. Objects are at the heart of the Object Oriented Paradigm What is an object?. Objects. We are surrounded by objects. In this class room there are desks, blackboards, lights , chairs and so on. Each object has specific attributes - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/1.jpg)
Objects
• Objects are at the heart of the Object Oriented Paradigm
• What is an object?
![Page 2: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/2.jpg)
Objects
• We are surrounded by objects.• In this class room there are desks,
blackboards, lights , chairs and so on.• Each object has specific attributes• The desk is made of wood. The seat has a
blue cover and so on.
![Page 3: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/3.jpg)
Objects have associations and relationships with each other .
• Objects have associations and relationships with each other .
• Seats have desktops attached.• All are attached to the floor• Seats are adjacent to other seats.• They are oriented in the same way.• Lights are controlled by switches
![Page 4: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/4.jpg)
Object Roles and Functions
• Each Object in the room has a specific role or function or behaviour.
• Seats are to be sat on.• Board is to be written on.• Lights can be turned on and off• Boards can be moved up and down and
seats can be put up and down.
![Page 5: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/5.jpg)
Objects can be classified
• Within the room objects can be grouped into different classes
• For example we could have the furniture objects e.g. chairs, tables, worktop
• We could also have the electrical objects.• Lights, projector, laptop and so on.
![Page 6: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/6.jpg)
The nature of Objects• Clearly Objects constitute a complex multi
faceted concept.• Their definition is dependent on many elements-
their attributes , their behaviour, their classification and as we will see much , much more
• To investigate the nature of objects , it is helpful to consider an important knowledge representation scheme which is the basis for theoretical frameworks of the object oriented paradigm
• This framework is known as semantic networks
![Page 7: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/7.jpg)
Semantic Nets
• Semantic networks are a popular scheme which elegantly reflect these ideas.
• A network consists of nodes repesenting objects, concepts and events and links between the nodes representing their interrelations.
![Page 8: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/8.jpg)
Example
• Using the example Birds have wings • a typical semantic net would be
![Page 9: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/9.jpg)
Origin• The development of semantic networks had its
origins in psychology. Ross Quillian in 1968 designed two semantic network based systems that were intended primariliy as psychological models of associateive memory.
• Semantic Networks quickly found application in AI. B. Raphaels SIR system, also 1968, was one of the first programs to use this type of representation scheme.
• SIR was a question Answering system and could answer questions requiring a variety of simple reasoning tasks and relationships
![Page 10: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/10.jpg)
Meaning of Semantic Nets
• The semantics of net structures however depends solely on the program that manipulates them and there are no fixed conventions about their meaning.
• A wide variety of network based systems have been implemented that use totally different procedures for making inferences.
![Page 11: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/11.jpg)
Another Example
Dog bone
likes
![Page 12: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/12.jpg)
Evolving Features
• While there are no fixed conventions, a number of important features of Semantic nets have emerged , that are widely used.
• These have largely emerged because of the application of Semantic Nets to Object Oriented Theory.
![Page 13: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/13.jpg)
Object Definitions
• The central aspect of the object paradigm is how it defines objects.
• The basic mechanism of representation is the articulation of class hierarchies.
• Instances of Objects exist. In turn Objects belong to classes and these in turn can belong to other classes
![Page 14: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/14.jpg)
Example
• Consider Fido ( who is a dog)• Fido is instance of the object “dog”.• Dogs belong to the class pets, which for
example could also include other classes such as cats.
• Pets in turn belong to a class animals and so on
![Page 15: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/15.jpg)
Fido
Dogs
Pets
Animals
Cats
![Page 16: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/16.jpg)
Labels used in Semantic Nets
• Objects and Instances• Both Represented by Nodes linked by an • IS_A link
Fido DogIS_A
InstanceObject
![Page 17: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/17.jpg)
Labels used in Semantic Nets
• Objects and Classes• Both Represented by Nodes linked by an • Subset or a SuperSet link
Dog PetsSubset
ObjectClass
![Page 18: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/18.jpg)
SuperSet links
• Objects and Classes• Both Represented by Nodes linked by an • SuperSet link
Dog PetsSubset
ObjectClassSuperset
![Page 19: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/19.jpg)
Relationships, attributes and associations
Relationships, attributes and associationsRepresented by a labelled link between
objects etc
Fido Black and white
colour
![Page 20: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/20.jpg)
Component Parts
• Object components• Both Represented by Nodes linked by an • HAP (has as part) link• A dog has a tail
Dog TailHAP
ObjectObject
![Page 21: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/21.jpg)
Inheritance
• Attributes of classes are inherited by subclasses and instances of objects
• Because we know dogs have tails and Fido is a dog we know Fido has a tail since this is inherited from the parent class
![Page 22: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/22.jpg)
Inheritance
• A dog has a tail and Fido is a dog
Dog TailHAP
ObjectObject
Fido
ISA
![Page 23: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/23.jpg)
Bigger Example
• Exercise• What does the following Semantic net
represent
![Page 24: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/24.jpg)
My House
Bungalow
House
Building
Roof
1brick
wallsRed
Habitation
No. Of Storeys
Purpose
Colour HAP HAP
subset
subset
ISAMade_of
![Page 25: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/25.jpg)
Advantages of Semantic Nets
• Easy to visualize – Graphical in nature – easy for humans to interpret
• Expressive power equal to or exceeding that of First Order Predicate Logic
• Formal definitions of semantic networks have been developed for use
• Related knowledge is easily clustered – logically and physically close
• Efficient in space requirements– Objects represented only once– Relationships handled by pointers
• Other schemes are limited to True or False answers where as Semantic Nets are more informative and flexible
• Not limited to only binary representation… can also represent action concepts
![Page 26: Objects](https://reader036.vdocuments.us/reader036/viewer/2022062811/56815f78550346895dce804c/html5/thumbnails/26.jpg)
Disadvantages of Semantic Nets
• Inheritance (particularly from multiple sources and when exceptions in inheritance are wanted) can cause problems such as conflicts
• Facts placed inappropriately cause problems
• No standards about node and arc values – in spite of the generic formal definitions