📜 ⬆️ ⬇️

Organic program and equipment interaction: Lilith project and Modula-2 programming language

This article will focus on Niklaus Wirth, his project Lilith and the language of Modula-2. For this project, Wirth was awarded the Alan Turing Award in 1984. The Alan Turing Prize is the equivalent of the Nobel Prize in the field of computer science, it was established in 1966 and is annually awarded by the Association of Computing Machinery for outstanding achievements in the field of computational sciences. Since 2007, the Turing Prize was sponsored by Google in conjunction with Intel, the amount of the prize was 250 thousand dollars. After Intel withdrew from the number of sponsors, the Google giant increased the payout four times to $ 1 million.



“Wirth always wanted to create airplanes, and he needed the best toolkit. That is why he designed many computer languages ​​and microcomputers ... ”.
')
Niklaus Wirth is a world-renowned scientist, engineer, researcher, PhD in electrical engineering and computer science, professor at the Federal Institute of Technology ETH in Zurich, we know him as the creator of the programming languages ​​Pascal, Oberon. In 1934, on February 15, he was born in the town of Winterthur (Switzerland) in the family of a teacher. In the parental house there was a large library and little Wirth had been interested in books about the railway, turbines and telegraph since childhood. He was fascinated by technology, he was engaged in aeromodelling and not only dreamed of flying, but lived with this dream, the dream of conquering airspace. While still in school, Wirth “equipped” in the school basement a secret laboratory, where he was engaged in modeling.


Swiss Federal Institute of Technology in Zurich

When Wirth was 18 years old, he and two more Zurich model airplanes received such long-awaited radio equipment from England. Such a passion for modeling, later developing a remote control, it can be said, determined the further fate of the great mind. In 1954, Wirth entered the Faculty of Electronics at the Swiss Federal Institute of Technology in Zurich, and received a bachelor's degree in electrical engineering. After this, Wirth studied at the University of Laval in Quebec (Université Laval, Canada), in 1960 he received a master's degree. He was invited to the University of California at Berkeley (USA), where he received a doctorate degree in electrical engineering and computer science in the future. In 1963, under the guidance of Professor Harry Husky, he defended his thesis on the development of Algol by means of Lisp. In the mid-60s of the last century, IFIP (International Federation for the Processing of Information) proposed to some specialists in the field of informatics to participate in the development and creation of a new programming language successor Algol-60.

Niklaus Wirth was among those invited, he participated in the creation of the Algol-W project, but the IFIP rejected his project for the benefit of the Algol-68 project. Until 1967, Wirth worked as an assistant professor at Stanford University, and in the same year he returned to his native Switzerland at the University of Zurich. He had an idea in his homeland to create something like Stanford. Becoming a professor of computer science, he not only "created and created", but also engaged in organizational activities. The ETH campus in spirit began to resemble the famous Stanford.

Twice, from 1982 to 1984 and from 1988 to 1990, Wirth was the head of the ETH faculty of computer science, in 1990 he was appointed head of the Institute of Computer Systems at the ETH.

Wirth was not satisfied with either the new Algol language or the languages ​​already used at that time, as he considered their properties and constructions often cannot be explained logically. He did not consider the programming language as a language, as a medium of communication between a person and a computer, but saw in the language primarily an abstract tool for constructing computer devices.

“In my understanding, a programming language is an incorrectly chosen term that misleads many. The term “program symbolism” (program notation) would be much more appropriate. ”

This is how the road began to create the well-known Pascal. First, its first version was developed, then the first version of the compiler, and in 1971 a description of the new language. Its main feature was simplicity, it was built on "... clear principles of structured programming, formulated by Edsger Dijkstra, on a beautiful mathematical basis laid by Anthony Hoare, and on a brilliant architectural embodiment of the Algol-W ideas implemented by Niklaus Wirth."

Technologically, it was interesting because its compiler was the first implementation of high-level languages ​​on itself. Two years later, the Pascal-machine (P-machine) was developed with a special P-code (byte-code). The interpretation method solved the problem of transferring the Pascal compiler to different platforms. By the way, the concept of the R-machine was used by James Gosling in constructing the language and architecture of Java.

Wirth of Pascal and R-code:
After it became known about the existence of Pascal, several people asked us to help in its implementation on different machines, emphasizing that they intend to use it for training and that speed for them is not of paramount importance. After that, we decided to create a version of the compiler that would generate the code for the machine of our own design. Later this code became known as the P-code ... Pascal-P turned out to be an exceptionally successful language for distribution to a large number of users. And if we had the wisdom to foresee the scale of such a development of events, we would have put more effort and care in developing and documenting the P-code.

Pascal was perceived by many as a tool for teaching students programming. Based on the words of Wirth himself, to become a teaching "material" was not the main goal of Pascal, rather it was "... a reasonable compromise between what was desirable and what was effective." After all, it is impossible to successfully use a language that is not suitable for solving any practical problems during the training.

Let us approach the key theme of this article about the turning point in the fate of Niklaus Wirth.

Virtue "... was tired of programming languages, and the need to write good compilers for existing computers. There was a desire to create something new, unknown with their own hands."


Xerox alto

During his vacation at the Xerox Research Center in Palo Alto in 1977, Wirth took up a serious technical project - creating a structured programming language that would be used to build large and complex systems and its feature would be to express units separately from compiled system components, known as modules. It was a professorship of one year, which was granted to “representatives of this profession” every seven years, so there was plenty of time to prepare for the project. At the research center, a real personal station with a vertical monitor, a mouse and its own Xerox Alto disk appeared before his eyes. Such a ready implementation served as a catalyst for the realization of the idea about creating your own computer, which we had long carried in Wirth’s head, and also the implementation of the language compiler on it, which is much more complicated than Pascal. To create a complete computer system for a user and for a developer with a personal workstation for a specific language - this is what Wirth has swallowed up with.

Lilith project and Modula-2 language




It was necessary to build from scratch your own computer system, which would include hardware, microcode, compiler, operating system, various service programs. It was necessary to create a compact, universal language that could solve the problems of system and application programming. In 1977, computers were huge mainframes with time-sharing systems, and they were accessed using terminals and remote satellites. A powerful personal workstation is a revolutionary idea of ​​the time. Wirth understood that it makes no sense to develop software that focuses on the old computing environment. The problem was that it was necessary to design and create a new computing environment, namely, a powerful personal workstation. This is how work began on the creation of a Lilith workstation.



Niklaus Wirth:

“I had the opportunity to closely get acquainted with the Mesa language developed by PARC, which had such a construction. I felt that the graceful descendant of Pascal could, with a new attempt to follow the spirit of his ancestor, if he was created as an extremely economical language. His name Modula-2 indicates the dominance of the module concept in our views, and the name was chosen - perhaps, unfortunately, not Pascal ++. ”

Work on the creation and development of new hardware and software was carried out simultaneously, Wirth and his group of like-minded people were working on creating a new programming language and its compiler, creating the basic OS, utilities, first applications.

The Modula-2 language was supposed to be simple and universal, used for all Lilith software. Wirth used in it the means of distinguishing between portable (applied) and non-portable (systemic) parts of the language, he introduced the pseudomodule SYSTEM, in which all the low-level programming tools (including type conversion functions) were located.

It was necessary to clearly formulate the concept of a module and implement it as a means for separate compilation.

As Wirth wrote "... Modularity is a decisive property that allows to combine conflicting requirements: ensuring the reliability of high-level abstraction through checking for redundancy and the availability of low-level tools that provide access to the individual design features of a particular computer. This allows the programmer to localize the use of low-level tools small parts of the system, thus protecting against unforeseen complications. "

The concept of a module with explicit lists of imported and exported identifiers was taken from the Mesa language, the idea of ​​a symbol file was borrowed as special information for the compiler about the objects exported by the corresponding module. The OS for Lilith was a single module hierarchy that could expand or shrink as requested by the developer.
Modularity, based on the principle of exporting / importing software elements and supporting separate compilation, became the dominant feature of the new language. The means of supporting multiprogramming, in contrast to the Modula language in Modula-2, was brought to the level of libraries.

In 1979, based on the compiler for the PDP-11, the first Modula compiler began to function. Initially, it consisted of 7 passes, each of which generated an intermediate code and recorded it on a 2 MB disk, later reduced the number of passes to 5. On the first pass, the lexical analyzer (scanner) spawned a string of tokens and a hash table of identifiers, the second pass (also parser) carried out the syntax analysis, the third pass solved the type checking problem, the fourth and fifth passes carried out code generation.

The first experiments were carried out on the legendary PDP-11 (Digital) computer with 64 Kbytes of memory.


Multiple PDP-11 mainframes in a tower enclosure assembled in a cluster

Nicklaus Wirth together with Richard Oran engaged in the development of the first layout of Lilith. Richard Oran - an expert in the field of electronics - wanted to take an advanced course in software and defend his thesis, Wirth invited him to take up the project Lilith. Work on the project so absorbed Oran that he even forgot about his thesis, all his thoughts were fascinated by the P-code and the P-machine. It was necessary to design an architecture that would be best suited for interpreting the M-code (compact code), the Modula equivalent of the corresponding P-Pascal code. Compact code is a factor of paramount importance for the implementation of complex systems on small workstations. Compactness was achieved through the use of different lengths of addresses and operands, 70% of all instruction parameters had values ​​in the range from 0 to 15, the operand was packed in one byte with the operation code. For intermediate results, a stack was organized (implemented as a 16-word fast SRAM memory — a small set of fast bipolar registers). Thanks to the stack and the flexible addressing scheme, the average length of instructions, including the operation code and data, was 10 bits. The M-code did not contain register numbers, as they were covered by the stack scheme.
For comparison:

“The code for the M-machine was three to four times less than the code for the PDP-11 and i8086, two to three times less than the code for the Motorola 68000 and one and a half to two times less than the code for the National Semiconductor 32000.”

Lilith was a computer with 4 Am2901 processor sets, made on the board, was oriented to work with 16-bit words, the M-code was oriented to a stream of bytes. Memory size was 216 words (128 Kb). The layout was built from 4K * 1 bit microcircuits. Memory access in Lilith was provided through a 64-bit bus, to support vector graphics, fonts, copying memory blocks, and increasing the accuracy of floating point operations, the Lilith processor used additional firmware.



The innovation was a raster display with high resolution. Initially, it was a display of 768 * 592 pixels in size, later a vertical display of 704 * 928 pixels with a frequency of about 30 MHz. Honeywell-Bull D-120 with a capacity of 10 MB was used as a disk. A three-button mouse was developed (alas, I did not find a good visual example of this particular mouse).


so at that time looked like a three-button computer mouse to Xerox Star


example of a graphic manipulator "Kolobok" from domestic computers of type EU-1840 / EU-1841

At the same time, Christian Jacobi implemented software support for the display and graphic windows. This became the basis of the first application programs, such as a text editor with drop-down menus.

Modula-2, after implementation, became an effective language. At the end of the 80s, a test series of Lilith personal workstations (20 pieces) was released in Utah.

Later during 1984, a new compiler for Modula-2 was developed.

"... I felt that many parts of the compilation could be performed more simply and more efficiently if it were then possible to use the memory sizes available today (those in which we worked were extremely modest by today's standards). Lilith’s memory was 64Kslov and its high the compactness of the code made it possible to implement a single-pass compiler. This implies a significant reduction in disk operations that absorbed most of the compilation time. Indeed, the compilation time of the compiler itself was reduced from 4 minutes to only 45 seconds und. The new compiler, however, kept splitting into tasks, but instead of each task setting its own pass — with sequential input and output to disk — it was allocated a special module with the most common procedural interface. General data structures, such as a table characters were defined in a separate data description module, which was imported (almost) by all other modules.These modules were a scanner, a parser, a code generator, and a symbol file handler. When the development of a new compiler is completed, it is rarely possible to resist the temptation to make some changes to the language. Here and in this case, some clarifications and changes were made, which are reflected in the revised description of the language. The only important change was related to the interface modules (or even more precisely, to the interface part of the module). This change postulated that all identifiers described in the interface part are exported, which makes the export list no longer necessary. "

The presence of a network connecting all workstations created a need for servers (the first was a printer server connected to a Canon LBP-10 laser printer, the second was a file server). By the way, Lilith became the first computer in Europe to fully exploit the possibilities of laser printing. In general, such computers for all the time it was released 60 pieces. In 1990, they were discontinued.

“The Lilith project proved that the development of a single-language system is not only possible, but also has several advantages. Literally everything, starting with drivers for devices and ending with a graphic editor and a text editor, is written in the same language. The approach to the modules related to the operating system and to the modules of the user program does not differ in any way. In fact, this distinction almost disappears, and together with it we get rid of the unchanging bulky resident block of the program, without which everyone is happy to do, but everyone is forced to use it. ”

Wirth always sought harmony, the organic unity of the hardware and software components, and his perseverance and talent undoubtedly made an invaluable contribution to the development of computational sciences. It is believed that his language Modula-2 was a compact and effective alternative to the Ada language. Systems such as OS / 400 for IBM AS / 400 were also implemented on Modula-2, the Digital Corporation created the Modula-3 language based on the same Modula-2 as the basis for the implementation of its internal projects. Compilers for personal computers PC, Apple II, Lisa, Macintosh, SIRIUS / VICTOR 9000, SAGE II, Amiga, Atari ST, IBM RS / 6000, Hewlett-Packard (MOCKA), Sun SPARC (Edinburgh) workstations, IBM mainframes were created (WATCOM), SGI and VAX (MOCKA), Digital Alpha (ModulaWare).

Wirth created the Oberon and Oberon-2 languages ​​(along with Professor H. Messenbok), the Oberon operating system.

As mentioned in the beginning of the article in 1984, Niklaus Wirth was awarded the honorary Alan Turing Prize, in 1989 - the Max Petitpierre Prize, as well as the IBM Europe Science and Technology Prize.



What is interesting, many do not know that Java and C # are built on the ideas of Wirth. The best Wirth languages, Modula-2 and Oberon, are almost never used, although programs written on them still work.

A great scientist, an engineer, a scholar of science has always strived for simplicity, which he called everyone to.

“Make it as simple as possible” - Niklaus Wirth's favorite phrase reminds an old joke that a perfect computer should have only two teams: RPM and MAKEIT

RPM - Read Programmers Mind ("read the thoughts of the programmer").

MAKEIT - Make It.

Projects by Niklaus Wirth


Niklaus Wirth Awards



"The path traversed by Wirth in the search for an acceptable system programming formalism, starting with NELIAC, through Algol-60 to Euler and Algol-W, Pascal, Modula-2 and, ultimately, to Lilith, is full of impressive discoveries and surprising results."



Thanks to friendship and personal relations with our Soviet programming pioneer Andrei Petrovich Ershov (after his visit to the United States in 1965), Niklaus Wirth repeatedly visited Akademgorodok in 1990, in 1996, and in 2005. This played a big role in popularizing Wirth's languages ​​and systems in our country. In the Pottosin group of the Institute of Sociology SB RAS, the idea arose to repeat the Wirth experiment and implement a processor with a high-level language-oriented architecture (the SOKRAT project).



The Modula-2 language was adopted by the USSR Council of Ministers as the base language for developing software for onboard systems. In 2005, Wirth again visited Academgorodok and brought his computer Lilith as a gift, but was unable to present it, as the customs detained a “valuable cargo”.

Source: https://habr.com/ru/post/391821/


All Articles