PhDOOS Logo

Supported by AITO.

These pages are currently maintained by Alex Potanin

 

ON THE COMPLEXITY OF OBJECT-ORIENTED PROGRAMS

Zoltán Porkoláb
( Hungarian )

ELTE University, Budapest
Zoltán Porkoláb ELTE TTK Dept. of General Computer Science Pázmány Péter sétány I/D BUDAPEST, HUNGARY H-1117
tel:
fax:
gsd@ludens.elte.hu

Keywords:

metrics

Abstract:

ON THE COMPLEXITY OF OBJECT-ORIENTED PROGRAMS
ÁKOS FÓTHI, JUDIT NYÉKY-GAIZLER, ZOLTÁN PORKOLÁB
Dept. of General Computer Science, Eötvös Loránd University, Budapest

H-1117 Budapest, Pázmány Péter Sétány I/D.

E-mail: fa@ludens.elte.hu, nyeky@ludens.elte.hu, gsd@ludens.elte.hu

HUNGARY


Abstract
Object-oriented programs are constructed with the help of the same control structures as traditional ones. At first sight, therefore, their complexity can be measured the same way as the complexity of the traditional programs. In this case the complexity depends on the nesting level of the control structures, as it has been shown by Piwowarski, Harrison, Magel, Howatt, Baker etc. Why do we still have the feeling that object-oriented programs are more simple than the traditional ones? To answer this, we have to introduce a new measure of complexity. The measures mentioned above have a common problem: each of them evaluates the complexity of a program only from the point of view of its control structure. Our opinion discussed here is that the complexity of a program is a sum of three components:
(1) the complexity of its control structure,

(2) the complexity of data types used,

(3) the complexity of the data handling (ie. the complexity of the connection between the control structure and the data types).
We give a suggestion for the measure of complexity of a program. First we show this measure working well on procedural programs. Then we extend the measure to object-oriented programs in the following steps:
(1) We define the complexity of class. Class is defined as a set of data (attributes) and control structures (methods) working on the attributes. We define the complexity of class as a sum of the complexity of attributes and the complexity of member functions. The definition reflects the common experience that good object-oriented programs have very strong binding between the attributes and the methods inside the class and have week connection between different classes. The measure is also examined on special cases such as member function calls other member function and classes with no attributes.
(2) We examine the complexity issues of the connection of classes. Inheritance and aggregate relationship between classes can increase global complexity of the program. However the next time we use the same class we can see the benefit of these constructions. We show on some classic example how complexity depends on binding between classes.
This new measure is equally adequate for procedural and object-oriented program structures. The new measure is also used to argue why good object-oriented programs could seem more simple then their procedural counterparts.
A software is under development to implement this measurement method and probe it for a few programming languages.

The PhD work started: 1997


The participant will apply for the
upcoming ECOOP PhD Workshop.


HTML3
JAVA

 


Last modified on Mon Aug 15 14:59:24 2005