Simula is the name of 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 an approximate superset of ALGOL 60,
and was also influenced by the design of SIMSCRIPT.
Simula 67 introduced objects, classes, inheritance and subclasses, virtual procedures, coroutines, and discrete event simulation, and featured garbage collection. Other forms of subtyping (besides inheriting subclasses) were introduced in Simula derivatives.
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 and 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 very-large-scale integration (VLSI) designs, process modeling, communication protocols, algorithms, and other applications such as typesetting, computer graphics, and education.
Computer scientists such as Bjarne Stroustrup, creator of C++, and James Gosling, creator of Java, have acknowledged Simula as a major influence. Simula-type objects are reimplemented in C++, Object Pascal, Java, C#, and many other languages.
Contents
History
The following account is based on Jan Rune Holmevik's historical essay.
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 further develop his ideas for a computer language to describe a system, Nygaard realized that he needed someone with more computer programming skills than he had. Ole-Johan Dahl joined him on his work in January 1962. Shortly after, the decision was made to link the language to ALGOL 60. By May 1962, the main concepts for a simulation language were established; SIMULA I, a specialized programming language designed for simulating discrete event systems, was born.
Kristen Nygaard was invited to visit the Eckert–Mauchly Computer Corporation in 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.
Sample code
Minimal program
The empty computer file is the minimal program in Simula, measured by the size of the source code. It consists of one thing only; a dummy statement.
However, the minimal program is more conveniently represented as an empty block:
Begin
End;
It begins executing and immediately terminates. The language lacks any return value from the program.
Classic Hello world
An example of a Hello world program in Simula:
Begin
OutText ("Hello, World!");
Outimage;
End;
Simula is case-insensitive.
Classes, subclasses and virtual procedures
A more realistic example with use of classes, subclasses and virtual procedures:
Begin
Class Glyph;
Virtual: Procedure print Is Procedure print;;
Begin
End;
Glyph Class Char (c);
Character c;
Begin
Procedure print;
OutChar(c);
End;
Glyph Class Line (elements);
Ref (Glyph) Array elements;
Begin
Procedure print;
Begin
Integer i;
For i:= 1 Step 1 Until UpperBound (elements, 1) Do
elements (i).print;
OutImage;
End;
End;
Ref (Glyph) rg;
Ref (Glyph) Array rgs (1 : 4);
! Main program;
rgs (1):- New Char ('A');
Call by name
Simula supports call by name 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
∑
{\displaystyle \sum }
which can be implemented as follows:
Real Procedure Sigma (k, m, n, u);
Name k, u;
Integer k, m, n; Real u;
Begin
Real s;
k:= m;
While k <= n Do Begin 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.
The following:
Z
Simulation
Simula includes a simulation package for doing discrete event simulations. This simulation package is based on Simula's object-oriented features and its coroutine concept. Simula provided functions to do random number generation of pseudo-random numbers.
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 Begin
Class FittingRoom; Begin
Ref (Head) door;
Boolean inUse;
Procedure request; Begin
If inUse Then Begin
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;





