The Historical way to Object Orientation


Table of Contents


The Historical way to Object Orientation (technological view)

  • Structured Programming (1970)
  • Experience1
  • Dijkstra: Notes on Structured Programming
  • The practical results
  • virtual machines from Dijkstra
  • Design 1
  • Ideas of Typing
  • Hoare: Notes on Data Structuring
  • Hoare, Dahl: Hierarchical Program Structures
  • Intermezzo on SIMULA (1968)
  • Short Description of SIMULA
  • Classes in Simula
  • Subtyping in SIMULA
  • Data Abstraction --- Abstract Program
  • Hoare: Proof on Correctness of Data Representations (1972)
  • Data Representations
  • The Proof
  • Practical Hints
  • Design 2
  • Abstract Datatypes (1975)
  • Goguen, Thatcher, Wagner 1975
  • Definitions
  • Compare different Implementations (Algebras)
  • The initial object is the abstract datatype
  • Object Orientation (1980)

  • The Historical way to Object Orientation (technological view)

    Abstract

    This chapter gives a survey through the ideas of software engineering which lead to object orientation. Because of the mass of existing material this lecture can not be complete. But it follwos one line of ideas to illustrate some views and obstructions on the way of OO.

    The result is that a lot of basic ideas (esp. the abstract data type) of object orientation had been in the minds of the theoreticers very early. But it needed a long time until these mostly intuitive ideas formed a concrete theory. A learning process which the traditional programmers now have to follow.


    Structured Programming (1970)

    The history of software engineering started at the end of the 1960's with the development of the structured programming method.

    At that time the developers faced more and more the problem that they had to maintain code written by other developers which was nearly impossible to understand. So the people looked for an answer to the following questions:

    1. How can you understand a program not written by yourself ?

    2. Which structure must a program have such that it is understandable ?

    3. How can the correctness of a program be proofed?

    The last question might be important only for theoretical computer scientist. But this question about proofing correctness led to new ideas and methods in the whole history of software engineering and is therefore the most important one.

    Jackson tried to solve the first problem by a bit strange method. His idea was that if you have a method by which every programmer writes the same code then every programmer can understand this code. He developed his method mainly from the work of Dijkstra.

    Experience 1

    Dijkstra gave the first stage of answers for these questions:


    Dijkstra: Notes on Structured Programming

    Dijkstra started by asking: 'Which Methods for Understanding do we have?.'

    He listed the following:

    1. Enumerative Reasoning
    This means understanding by following the sequence of code step by step. Sequences and selections are checked by this method.

    2. Induction
    The method for proofing the correctness of loops.

    3. Abstraction
    This is the most powerful tool of understanding. Dijstra found two main tools for abstraction:

    1. A variable is an abstraction from its value

    2. A using a named operation on account of 'what it does' while completely disregarding 'how it works'

    The next step in his thoughts was to find out how a program can be devided into 'understandable' subparts during the design step.

    Flowcharts
    can be used describing the sequence, selections and loops in a program. Especially sequence, selections and loops are the only allowed elements of a program. This rule lead to the disclosure of GoTo's. If a program contains a goto into a loop the behaviour of this loop cannot be checked any more by induction and is therefore not understandable.

    Functional Decomposition
    The abstraction of operation is done by decompose the program into subactions with one entry and one exit. To garantee the encapsulation of the algorithm of a subaction subroutines were introduced. The user of a subroutine must only know its input parameters and the promised output.

    The practical results

    The enumerative reasoning is very limited for a human. Jackson told in his courses on structured programming that a subroutine should not be larger than one output page. Even selections are sometimes difficult to understand by enumeration. Everybody worked with old code (10 years and older) will agree that it is hard work to check the result of an IF-THEN-ELSE group with more than 2 boolean expressions. The limit for understanding programs by emumeration lies approximately by 50 statements with max. 3 select dimensions.

    The most practical hints in structured programming were given on the base of enumeration - the poorest tool we have.

    The hints given to get an ideal functional decomposition were very vague.

    How to do functional decomposition:

    1. Formulate problem as a function B = F(A).

    2. Refine this function into subfunctions.

    The main questions answered during the decomposition process is: How do I get B from A ?

    The typical examples were the realisation of mathematical algorithms on the computer. The example from Dijkstra:

    Print the first 1000 prime numbers