Simula is considered the first object-oriented programming language. As its name suggests, the first Simula version by 1962 was designed for doing simulations; Simula 67 though was designed to be a general-purpose programming language[3] and provided the framework for many of the features of object-oriented languages today.
The following account is based on Jan Rune Holmevik's historical essay.[5][6]
Kristen Nygaard started writing computer simulation programs in 1957. Nygaard saw a need for a better way to describe the heterogeneity and the operation of a system. To go further with his ideas on a formalcomputer language for describing a system, Nygaard realized that he needed someone with more computer programming skills than he had. Ole-Johan Dahl joined him on his work January 1962. The decision of linking the language up to ALGOL 60 was made shortly after. By May 1962, the main concepts for a simulationlanguage were set. SIMULA I was born, a special purpose programming language for simulating discrete event systems.
Kristen Nygaard was invited to visit the Eckert–Mauchly Computer Corporation late May 1962 in connection with the marketing of their new UNIVAC 1107 computer. At that visit, Nygaard presented the ideas of Simula to Robert Bemer, the director of systems programming at Univac. Bemer was a great ALGOL fan and found the Simula project compelling. Bemer was also chairperson of a session at the second international conference on information processing hosted by International Federation for Information Processing (IFIP). He invited Nygaard, who presented the paper "SIMULA – An Extension of ALGOL to the Description of Discrete-Event Networks".
The Norwegian Computing Center got a UNIVAC 1107 in August 1963 at a considerable discount, on which Dahl implemented the SIMULA I under contract with UNIVAC. The implementation was based on the UNIVAC ALGOL 60 compiler. SIMULA I was fully operational on the UNIVAC 1107 by January 1965. In the following few years, Dahl and Nygaard spent a lot of time teaching Simula. Simula spread to several countries around the world and SIMULA I was later implemented on other computers including the Burroughs B5500 and the Russian Ural-16.
In 1966 C. A. R. Hoare introduced the concept of record class construct, which Dahl and Nygaard extended with the concept of prefixing and other features to meet their requirements for a generalized process concept. Dahl and Nygaard presented their paper on Class and Subclass declarations at the IFIP Working Conference on simulation languages in Oslo, May 1967. This paper became the first formal definition of Simula 67. In June 1967, a conference was held to standardize the language and initiate a number of implementations. Dahl proposed to unify the type and the class concept. This led to serious discussions, and the proposal was rejected by the board. Simula 67 was formally standardized on the first meeting of the Simula Standards Group (SSG) in February 1968.
Pages from the DECsystem-10 SIMULA Language Handbook, as published by the Swedish National Defence Research Institute
These implementations were ported to a wide range of platforms. The TOPS-10 implemented the concept of public, protected, and private member variables and procedures, that later was integrated into Simula Standard in 1986.
Simula Standard 1986 is the latest standard and is ported to a wide range of platforms. There are mainly four implementations:
In November 2001, Dahl and Nygaard were awarded the IEEE John von Neumann Medal by the Institute of Electrical and Electronics Engineers "For the introduction of the concepts underlying object-oriented programming through the design and implementation of SIMULA 67". In April 2002, they received the 2001 A. M. Turing Award by the Association for Computing Machinery (ACM), with the citation: "For ideas fundamental to the emergence of object oriented programming, through their design of the programming languages Simula I and Simula 67." Dahl and Nygaard died in June and August of that year, respectively, [10] before the ACM Turing Award Lecture[11] that was scheduled to be delivered at the November 2002 OOPSLA conference in Seattle.
Simula Research Laboratory is a research institute named after the Simula language, and Nygaard held a part-time position there from the opening in 2001. The new Computer Science building at the University of Oslo is named Ole Johan Dahl's House, in Dahl's honour, and the main auditorium is named Simula.
Simula supports call by name[1]: 8.2.3 so the Jensen's Device can easily be implemented. However, the default transmission mode for simple parameter is call by value, contrary to ALGOL which used call by name. The source code for the Jensen's Device must therefore specify call by name for the parameters when compiled by a Simula compiler.
Another much simpler example is the summation function which can be implemented as follows:
RealProcedure Sigma (k, m, n, u);
Name k, u;
Integer k, m, n; Real u;
BeginReal s;
k:= m;
While k <= n DoBegin s:= s + u; k:= k + 1; End;
Sigma:= s;
End;
The above code uses call by name for the controlling variable (k) and the expression (u).
This allows the controlling variable to be used in the expression.
Note that the Simula standard allows for certain restrictions on the controlling variable
in a for loop. The above code therefore uses a while loop for maximum portability.
Sam, Sally, and Andy are shopping for clothes. They must share one fitting room. Each one of them is browsing the store for about 12 minutes and then uses the fitting room exclusively for about three minutes, each following a normal distribution. A simulation of their fitting room experience is as follows:
Simulation BeginClass FittingRoom; BeginRef (Head) door;
Boolean inUse;
Procedure request; BeginIf inUse ThenBegin
Wait (door);
door.First.Out;
End;
inUse:= True;
End;
Procedure leave; Begin
inUse:= False;
Activate door.First;
End;
door:- New Head;
End;
Procedure report (message); Text message; Begin
OutFix (Time, 2, 0); OutText (": " & message); OutImage;
End;
Process Class Person (pname); Text pname; BeginWhileTrueDoBegin
Hold (Normal (12, 4, u));
report (pname & " is requesting the fitting room");
fittingroom1.request;
report (pname & " has entered the fitting room");
Hold (Normal (3, 1, u));
fittingroom1.leave;
report (pname & " has left the fitting room");
End;
End;
Integer u;
Ref (FittingRoom) fittingRoom1;
fittingRoom1:- New FittingRoom;
ActivateNew Person ("Sam");
ActivateNew Person ("Sally");
ActivateNew Person ("Andy");
Hold (100);
End;
The main block is prefixed with Simulation for enabling simulation. The simulation package can be used on any block and simulations can even be nested when simulating someone doing simulations.
The fitting room object uses a queue (door) for getting access to the fitting room. When someone requests the fitting room and it's in use they must wait in this queue (Wait (door)). When someone leaves the fitting room the first one (if any) is released from the queue (Activate door.first) and accordingly removed from the door queue (door.First.Out).
Person is a subclass of Process and its activity is described using hold (time for browsing the store and time spent in the fitting room) and calls procedures in the fitting room object for requesting and leaving the fitting room.
The main program creates all the objects and activates all the person objects to put them into the event queue. The main program holds for 100 minutes of simulated time before the program terminates.
^Kristen Nygaard and Ole-Johan Dahl. 1978. The development of the SIMULA languages. History of programming languages. Association for Computing Machinery, New York, NY, USA, 439–480. DOI:https://doi.org/10.1145/800025.1198392
^Holmevik, Jan Rune. "Compiling Simula". Oslo, Norway: Institute for Studies in Research and Higher Education. Archived from the original on 20 April 2009. Retrieved 19 April 2017.
^Lehrmann Madsen, Ole (2014). "Building Safe Concurrency Abstractions". In Agha, Gul; Igarashi, Atsushi; Kobayashi, Naoki; Masuhara, Hidehiko; Matsuoka, Satoshi; Shibayama, Etsuya; Taura, Kenjiro (eds.). Concurrent Objects and Beyond. Lecture Notes in Computer Science. Vol. 8665. Berlin: Springer. p. 68. doi:10.1007/978-3-662-44471-9. ISBN978-3-662-44471-9. S2CID1000741.