Presentation is loading. Please wait.

Presentation is loading. Please wait.

Objects Objects are at the heart of the Object Oriented Paradigm What is an object?

Similar presentations


Presentation on theme: "Objects Objects are at the heart of the Object Oriented Paradigm What is an object?"— Presentation transcript:

1 Objects Objects are at the heart of the Object Oriented Paradigm What is an object?

2 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.

3 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

4 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.

5 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.

6 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

7 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.

8 Example Using the example Birds have wings a typical semantic net would be

9 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

10 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.

11 Another Example Dogbone likes

12 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.

13 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

14 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

15 Fido Dogs Pets Animals Cats

16 Labels used in Semantic Nets Objects and Instances Both Represented by Nodes linked by an IS_A link FidoDog IS_A Instance Object

17 Labels used in Semantic Nets Objects and Classes Both Represented by Nodes linked by an Subset or a SuperSet link DogPets Subset Object Class

18 SuperSet links Objects and Classes Both Represented by Nodes linked by an SuperSet link DogPets Subset Object Class Superset

19 Relationships, attributes and associations Represented by a labelled link between objects etc Fido Black and white colour

20 Component Parts Object components Both Represented by Nodes linked by an HAP (has as part) link A dog has a tail DogTail HAP Object

21 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

22 Inheritance A dog has a tail and Fido is a dog DogTail HAP Object Fido ISA

23 Bigger Example Exercise What does the following Semantic net represent

24 My House Bungalow House Building Roof 1 brick wallsRed Habitation No. Of Storeys Purpose Colour HAP subset ISA Made_of

25 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

26 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


Download ppt "Objects Objects are at the heart of the Object Oriented Paradigm What is an object?"

Similar presentations


Ads by Google