74188

Object-oriented programming languages and tools

Лекция

Информатика, кибернетика и программирование

They were working on simultions tht del with exploding ships nd relized they could group the ships into different ctegories. The Smlltlk tem ws inspired by the Simul 67 project but they designed Smlltlk so tht it would be dynmic. The objects could be chnged creted or deleted nd this ws different from the sttic systems tht were commonly used. It is this feture tht llowed Smlltlk to surpss both Simul 67 nd the nlog progrmming systems.

Английский

2014-12-29

37 KB

0 чел.

Lecture 7. Object-oriented programming languages and tools. Part 1.

7.1 The history of object oriented programming1

The basis for OOP started in the early 1960s. The first programming language to use objects was Simula 67. It was designed for the purpose of creating simulations, and was developed by Kristen Nygaard and Ole-Johan Dahl in Norway.

They were working on simulations that deal with exploding ships, and realized they could group the ships into different categories. Each ship type would have its own class, and the class would generate its unique behavior and data. Simula was not only responsible for introducing the concept of a class, but it also introduced the instance of a class.

The term “object oriented programming” was first used by Xerox PARC in their Smalltalk programming language. The term was used to refer to the process of using objects as the foundation for computation. The Smalltalk team was inspired by the Simula 67 project, but they designed Smalltalk so that it would be dynamic. The objects could be changed, created, or deleted, and this was different from the static systems that were commonly used. Smalltalk was also the first programming language to introduce the inheritance concept. It is this feature that allowed Smalltalk to surpass both Simula 67 and the analog programming systems. While these systems were advanced for their time, they did not use the inheritance concept.

Simula 67 was a groundbreaking system that has inspired a large number of other programming languages, and some of these include Pascal and Lisp. By the 1980s, object oriented programming had become prominent, and the primary factor in this is C++. Object oriented programming was also important for the development of Graphical user interfaces. The Cocoa structure that exists within Mac OS X is a good example of a dynamic GUI that works with an object oriented programming language. This paradigm of programming has also played an important role in the development of event-driven programming.

Niklaus Wirth and his associates were looking at areas such as modular programming and data abstraction, and they developed two systems which incorporated these elements. These two systems are Oberon and Modula-2. Oberon used a unique approach to classes and object orientation that is much different than C++ or Smalltalk. Since the introduction of OOP, a large number of modern programming languages are now using the concept. Some of these are Fortran, BASIC, and Pascal. There have been some compatibility issues, because many programs were not designed with a OOPs approach in mind. Object oriented programming languages that were "pure" did not have many of the functions that programmers needed.

To solve these problems, a number of researchers have been attempting to design new programming languages that used object oriented concepts but still retained many of the functions that programmers needed. One example of a programming language that has achieved this to some degree is Eiffel. Another programming language that has attempted to solve this problem is Java. Java has become popular because it uses a virtual machine, and it is very similar to C++ and C. The virtual machine is important because it allows code to be run on multiple platforms without having to be changed. Another system that is similar is Microsoft’s .NET. Many developers now understand the importance of OOP, and are actively using it within their own programs. Many researchers have continued to make advancements by using the object oriented approach.

There are a number of other languages that have successfully combined the object oriented approach with procedures that are useful to programmers. Python is one example, and Ruby uses a similar approach as well.

The use of an object oriented approach has led to advancements in modeling languages, design patterns, and a number of other areas. It is likely that OOP is a programming paradigm that will continue to evolve as we move forward into the future. It is a powerful language which has continued to improve over the years. It is the subject of debate within the programming community, as critics point out a number of problems with the structure. However, the popularity of programming languages such as Java demonstrates that it is a paradigm that is here to stay.

7.2 SIMULA

Simula is a name for two simulation programming languages, Simula I and Simula 67, developed in the 1960s at the Norwegian Computing Center in Oslo, by Ole-Johan Dahl and Kristen Nygaard. Syntactically, it is a fairly faithful superset of ALGOL 60.

Idea. Dahl and Nygaard worked on simulations that deal with exploding ships. They realized they could group the ships into different categories, each ship type would have its own class and the class would generate its unique behavior and data.  Simula was not only responsible for introducing the concept of a class, but it also introduced the instance of a class.

Example.

Class Rectangle (Width, Height);

Real Width, Height;

Boolean Procedure IsSquare;

     IsSquare := Width=Height;

End of Rectangle;

Simula 67 introduced objects, classes, inheritance and subclasses, virtual methods, coroutines, discrete event simulation, and features garbage collection. Subtyping was introduced in Simula derivatives.

Simula is considered the first object-oriented programming language. As its name implies, Simula was designed for doing simulations, and the needs of that domain provided the framework for many of the features of object-oriented languages today.

Simula has been used in a wide range of applications such as simulating VLSI designs, process modeling, protocols, algorithms, and other applications such as typesetting, computer graphics, and education. The influence of Simula is often understated, and Simula-type objects are reimplemented in C++, Java and C#. The creator of C++, Bjarne Stroustrup, has acknowledged that Simula 67 was the greatest influence on him to develop C++, to bring the kind of productivity enhancements offered by Simula to the raw computational speed offered by lower level languages like BCPL.

Simula is still used for various types of university courses.

7.3 Evolution of SIMULA2

General purpose languages. High level languages, like FORTRAN, ALGOL 60 and COBOL were originally regarded as useful for two purposes:

 to provide concepts and statements allowing precise formal description of computing processes and also making communication between programmers easier

 to provide the non-specialist with a tool making it possible for him to solve small and medium sized problems without special help.

High level languages have succeeded in these respects. However, strong new support for these languages developed from the task of organizing and implementing very complex, highly interactive programs, such as large simulations.

1) In order to decompose the problem into natural, easily conceived components:

  •  each part should be describable as an individual program
  •  the language should provide for this
  •  the language should  contain means for describing he joint interactive execution of these sub-programs

2) In order to relate and operate a collection of programs  the language should have:

  •  the necessary powerful list processing capabilities
  •  the  sequencing capabilities

3) In order to reduce the excessive amount of debugging

  •  the language should give “reference security”
  •  the language and its compiler should spot and not execute invalid use of data through data reference based on wrong assumptions

SIMULA 67 (SIMUlation Language) contains most features of the general algorithmic language ALGOL 60 as a subset. The reason for choosing ALGOL 60 as a starting point was that its basic structure lent itself to extension. It was felt that it would be impractical for the users to base SIMULA 67 on yet another new algorithmic language, and ALGOL 60 already has a user basis, mainly in Europe.

In dealing with problems and systems containing a large number of details, decomposition is of prime importance. By decomposing a large problem, one can obtain component problems of manageable size to be dealt with one at a time, and each containing a limited number of details. Suitable decomposition is an absolute requirement if more than one person takes part in the analysis and programming.

The fundamental mechanism for decomposition in ALGOL 60 is the block concept. A block is completely independent of the rest of the program. The locality principle ensures that any reference to a local quantity is correctly interpreted regardless of the environment of the block.

The block concept corresponds to the intuitive notion of “sub-problem” or “sub-algorithm”. A block is a formal description (or “pattern”) of an aggregated data structure and the associated algorithms and actions. When a block is executed, a dynamic “instance” of the block is generated. Ina computer, a block instance may take the form of a memory area containing the necessary dynamic block information and including space for holding the contents of variables local to the block.

A block instance can be thought of as a textual copy of its formal description, in which local variables identify pieces of memory allocated to the block instance.

The notion of block instances leads to the possibility of generating several instances of a given block which may co-exist and interact, such as, for example, instances of a recursive procedure. This further leads to the concept of a block as a “class” of “objects”, each being a dynamic instance of the block, and therefore conforming to the same pattern.

A central concept in SIMULA 67 is the “object”. An object is a self-contained program (block instance), having its own local data and actions defined by a “class declaration”. The class declaration defines a program (data nad action) pattern, and objects conforming to that pattern are said to “belong to the same class”. If no actions are specified in the class declaration, a class of pure data structures is defined. New objects belonging to the class can be generated. The need for manipulating objects and relating objects to each other makes it necessary to introduce list processing facilities.

A class may be used as a “prefix” to another class declaration, thereby building the properties defined in the prefix into the objects defined by the new class declaration. If actions are defined in a class declaration, actions conforming to this pattern may be executed by all objects belonging to that class. The actions belonging to one object may all be executed as a series of separate subsequences, or “active phases”. Between two active phases of a given object, any number of active phases of other objects may occur.

SIMULA 67 contains basic features necessary for organizing the total program execution as a sequence of active phases belonging to objects. These basic features may be the foundation for aggregated sequencing principles, of which the class SIMULATION is an example.

When many objects belonging to various classes co-exist as parts of the same total program, it is necessary to be able to assign names to individual objects, and also to relate objects to each other, e.g. through binary trees and various other types of list structures. A system class. “SIMSET”, introducing circular two-way lists is a part of the language.

Hence basic new types, “references”, are introduced. References are “qualified”, which implies that a given reference only may refer to objects belonging to the class mentioned in the qualification (or belonging to subclasses of the qualifying class).

1 http://www.exforsys.com/tutorials/oops-concepts/the-history-of-object-oriented-programming.html

2 Simula 67. An introduction. Compiled by Robin Hills. Published by Robin Hills (Consultants) Ltd, 1972. – 51p.


 

А также другие работы, которые могут Вас заинтересовать

39416. Детали машин и основы конструирования 1007.43 KB
  2 РАСЧЕТ КРУТЯЩИХ МОМЕНТОВ НА ВАЛАХ И ЧАСТОТ ВРАЩЕНИЯ Быстроходный вал: n1б=nа=1455 об мин. 3 РАСЧЕТ ЗУБЧАТЫХ ПЕРЕДАЧ 3.2 Проверочный расчет на прочность закрытой цилиндрической зубчатой передачи 3.170; t – расчетный срок службы передачи t =12000 ч; n – частота вращения вала; Nk1 = 60 ∙ с ∙ n1 ∙ t =60 ∙ 1 ∙ 28088 ∙ 12000=2022∙106 циклов; Nk2 = 60 ∙ с ∙ n2 ∙ t =60 ∙ 1∙ 70 ∙ 12000=504∙106 циклов.
39417. Устройство сбора данных 368.5 KB
  В радиотехнических системах и в технике связи УСД используются для обработки сигналов функционального контроля каналов связи диагностирования состояния аппаратуры. Имеется F аналоговых каналов. Необходимо опрашивая их согласно заданной последовательности получаемые из каналов аналоговые величины с помощью АЦП преобразовывать в цифровую форму двоичные слова стандартной длины 1 байт = 8 бит и помещать в последовательные ячейки некоторой области ЗУ начиная с ячейки имеющей адрес G. Разработать системы формирования адресов ячеек ОЗУ и...
39418. Система передачи 262.5 KB
  В состав аппаратуры ИКМ120У входят: аналогоцифровое оборудование формирования стандартных потоков АЦО оборудование вторичного временного группообразования ВВГ оконечное оборудование линейного тракта ОЛТ необслуживаемые регенерационные пункты НРП комплекс измерительного оборудования. Максимальное число НРП между ОРП 48 Максимальное число НРП в полу секции ДП 24 1 1 1 0 0 1 1 0 1с 2с 3с 4с 1с 1с 2с 3с 4с 1с 2с 3с 4с 1с 2с 3с 4с 1с 2с 3с 4с 1с 2с 3с 4с 1с 2с 3с 4с 1с...
39419. Составление программы тренировки силовой подготовки для юношей начинающих заниматься силовым троеборьем 365 KB
  В тяжелоатлетическом спорте, как и в любом виде спорта, для достижения результатов мирового класса требуется многолетняя, в высшей степени целенаправленная, с максимальной отдачей сил подготовка, начиная с детского возраста
39420. Ортопедическая стоматология 471.5 KB
  Роль учёных бывшего СССР и РБ в развитии ортопедической стоматологии и совершенствование оказания ортопедической помощи населению. Полное отсутствие коронки зуба. Клиника, функциональные нарушения, методы протезирования. Восстановительные штифтовые конструкции, их разновидности. Показания к применению штифтовых зубов по Ричмонду, по Ильиной-Маркосян, простого штифтового зуба, культевой штифтовой вкладки.
39421. РАЗРАБОТКА СХЕМЫ ОРГАНИЗАЦИИ СВЯЗИ 1.03 MB
  Размещение необслуживаемых регенерационных пунктов НРП вдоль кабельной линии передачи осуществляется в соответствии с номинальной длиной регенерационного участка РУ для проектируемой ЦСП. При необходимости допускается проектирование укороченных относительно номинального значения РУ которые следует располагать прилегающими к ОП или ПВ так как блоки линейных регенераторов в НРП не содержат искусственных линий ИЛ. Необходимое число НРП определить по формуле: N = n 1; 8 Количество НРП на секциях ОП1 ПВ и ОП2 ПВ определить из...
39422. ПРОЕКТИРОВАНИЕ ЦИФРОВОЙ ЛИНИИ ПЕРЕДАЧИ МНОГОКАНАЛЬНОЙ СИСТЕМЫ 401.5 KB
  В состав аппаратуры ИКМ120У входят: оборудование вторичного временного группообразования ВВГ оконечное оборудование линейного тракта ОЛТ необслуживаемые регенерационные пункты НРП а также комплект контрольноизмерительных приборов КИП. Сформированный в оборудовании ВВГ цифровой сигнал в коде МЧПИ или ЧПИ поступает в оконечное оборудование линейного тракта которое осуществляет согласование выхода оборудования ВВГ с линейным трактом дистанционное питание НРП телеконтроль и сигнализацию о состоянии оборудования линейного тракта...
39423. Будова та принцип роботи комп’ютера 146 KB
  Компю’тер — це електронна система, яка призначена для опрацювання різних видів інформації, що подається в цифрових кодах за наперед складеними програмами (алгоритмами).