Hubbry Logo
SimulaSimulaMain
Open search
Simula
Community hub
Simula
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Simula
Simula
from Wikipedia
Simula
ParadigmsMulti-paradigm: procedural, imperative, structured, object-oriented
FamilyALGOL
Designed byOle-Johan Dahl
DeveloperKristen Nygaard
First appeared1962; 63 years ago (1962)
Stable release
Simula 67, Simula I
Typing disciplineStatic, nominative
ScopeLexical
Implementation languageALGOL 60 (mostly)
SIMSCRIPT (some parts)
OSUnix-like, Windows, z/OS, TOPS-10, MVS
Websitewww.simula67.info
Influenced by
ALGOL 60, SIMSCRIPT
Influenced
BETA, CLU, Eiffel, Emerald, Pascal, Smalltalk, C++, and many other object-oriented programming languages

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, [1]: 1.3.1  and was also influenced by the design of SIMSCRIPT.[2][3]

Simula 67 introduced objects,[1]: 2, 5.3  classes,[1]: 1.3.3, 2  inheritance, subclasses[1]: 2.2.3  and an implementation of the polymorphism,[1]: 1.3.3  virtual procedures,[1]: 2.2.3  coroutines,[1]: 9.2  and discrete event simulation,[1]: 14.2  and featured garbage collection.[1]: 9.1  Other forms of subtyping (besides inheriting subclasses) were introduced in Simula derivatives.[citation needed]

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[4] 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.[5] Simula-type objects are reimplemented in C++, Object Pascal, Java, C#, and many other languages.

History

[edit]

The following account is based on Jan Rune Holmevik's historical essay.[6][7][8][9]

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.

Pages from the DECsystem-10 SIMULA Language Handbook, as published by the Swedish National Defence Research Institute

Simula was influential in the development of Smalltalk and later object-oriented programming languages. It also helped inspire the actor model of concurrent computation although Simula only supports coroutines and not true concurrency.[10]

In the late sixties and the early seventies, there were four main implementations of Simula:

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:

  • Simula AS
  • Lund Simula
  • GNU Cim[11]
  • Portable Simula Revisited[12]

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,[13] before the ACM Turing Award Lecture[14] 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.

Sample code

[edit]

Minimal program

[edit]

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

[edit]

An example of a Hello world program in Simula:

Begin
   OutText ("Hello, World!");
   Outimage;
End;

Simula is case-insensitive.

Classes, subclasses and virtual procedures

[edit]

A more realistic example with use of classes,[1]: 1.3.3, 2  subclasses[1]: 2.2.1  and virtual procedures:[1]: 2.2.3 

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');
   rgs (2):- New Char ('b');
   rgs (3):- New Char ('b');
   rgs (4):- New Char ('a');
   rg:- New Line (rgs);
   rg.print;
End;

The above example has one super class (Glyph) with two subclasses (Char and Line). There is one virtual procedure with two implementations. The execution starts by executing the main program. Simula lacks the concept of abstract classes, since classes with pure virtual procedures can be instantiated. This means that in the above example, all classes can be instantiated. Calling a pure virtual procedure will however produce a run-time error.

Call by name

[edit]

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:

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:

can then be implemented as follows:

Z:= Sigma (i, 1, 100, 1 / (i + a) ** 2);

Simulation

[edit]

Simula includes a simulation[1]: 14.2  package for doing discrete event simulations. This simulation package is based on Simula's object-oriented features and its coroutine[1]: 9.2  concept. Simula also was used for simulation proposes using procedural generation to generate pseudo-random numbers.[1]: 12.1 

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;
   
   Process Class Person (pname); Text pname; Begin
      While True Do Begin
         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;
   Activate New Person ("Sam");
   Activate New Person ("Sally");
   Activate New 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.

Notes

[edit]

Sources

[edit]

Further reading

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
Simula is a family of simulation programming languages, Simula I and Simula 67, developed in the 1960s at the Norwegian Computing Center in by and , recognized as the first language for introducing foundational concepts like classes, objects, , and dynamic simulation processes. The development of Simula originated in spring 1961 at the Norwegian Computing Center (NCC), driven by the need for a specialized language to model complex systems in operational , particularly simulations and discrete event networks. Nygaard's prior experience with simulations in 1948 influenced the design, leading to Simula I's initial concepts documented on January 5, 1962, and its compiler completed in January 1965 for systems like the UNIVAC 1100. Simula I extended with features for quasi-parallel process execution and set-based process management, enabling efficient simulation of dynamic systems. By 1965–1966, the project evolved into Simula 67, a with its defined in June 1967 and finalized in May 1968, incorporating input-output hierarchies, string handling, and implementations on platforms like 360/370 and Control Data systems. Simula's innovations profoundly shaped modern programming by pioneering object-oriented paradigms, where classes served as templates for objects modeling real-world entities with encapsulated data and procedures, supporting through subclass prefixing and virtual mechanisms for polymorphic behavior. These concepts emphasized procedural , modularity, and via static and dynamic checks, facilitating and error reduction in large-scale software. The language's influence extended to subsequent systems like Smalltalk in , which refined Simula's ideas into pure object-orientation, and later languages such as and C++, embedding OOP as a dominant in . For their contributions, Dahl and Nygaard received the 2001 ACM A.M. , often called the "Nobel Prize of computing," and the 2002 . Simula also inspired follow-on projects like the DELTA and BETA languages in the 1970s, and it remains relevant in academic contexts for teaching and OOP principles.

History

Development origins

Simula's development originated at the Norwegian Computing Center (NCC) in , , where the project was initiated in spring 1961 to address pressing needs in simulation programming for . The primary motivation stemmed from the challenges of modeling complex systems, particularly in industrial and economic contexts, where existing tools fell short in handling discrete event simulations efficiently. This effort was driven by the recognition that simulation languages required more flexible structures for describing dynamic processes, building on the limitations observed in earlier methods and general-purpose languages. The language was conceived as an extension of , leveraging its block structure and programming security to ensure compatibility and broad appeal among European researchers. The initial focus centered on , enabling the modeling of sequential processes in areas like and , which were critical for applications in industry and economics. This approach allowed Simula to go beyond mere numerical computation, incorporating concepts for system description that facilitated both simulation and analysis of real-world scenarios. Early prototypes emerged as Simula I between 1964 and 1965, initially implemented under a for the 1100 series to support tasks. This version marked the first operational form of the , emphasizing its utility in simulations for control and . A notable early application occurred in 1965, when Simula I was used for shipyard simulations, demonstrating its practical effectiveness in optimizing industrial workflows through discrete event modeling.

Key contributors and milestones

The development of Simula was primarily led by Ole-Johan Dahl and Kristen Nygaard at the Norwegian Computing Center (NCC) in Oslo, where they conceived and designed the language as an extension of ALGOL 60 for simulation purposes. Dahl, who joined NCC in 1963 after earlier work in software development at the Norwegian Defence Research Establishment (NDRE), focused on implementing core concepts like the process mechanism, while Nygaard joined NCC in 1960 and became its Director of Research in 1962, driving the initial vision for a simulation language. Their collaboration built on foundational influences from Jan V. Garwick, a pioneer in Norwegian informatics who mentored both at NDRE in the 1950s, contributing early ideas on computing systems and garbage collection that informed Simula's runtime features. A key milestone occurred in early 1965, when the first Simula I compiler was completed for the 1107 system, enabling practical use in . This culminated in the public demonstration of Simula I at the IFIP Congress in New York from May 24 to 29, 1965, where Dahl and Nygaard presented results from a real-life model, marking the language's debut and gaining international attention for its innovative approach to . Building on Simula I, the team advanced to Simula 67 in 1966–1967, generalizing the language into a full programming with class concepts for broader applicability. Simula 67 was officially introduced by Dahl and Nygaard at the IFIP TC 2 Working Conference on Simulation Languages in Lysebu, near , from May 22 to 26, 1967, followed by the publication of the "SIMULA 67 Proposal" report in May 1967, which outlined the standardized core features required for all implementations. This report, issued by the Norwegian Computing Center, established Simula 67 as a portable, extensible language and laid the groundwork for the formal definition later refined in 1968. In recognition of their pioneering work on Simula, which introduced fundamental object-oriented programming concepts such as classes, objects, and , Dahl and Nygaard received the A.M. in 2001 from for Computing Machinery. The award citation specifically credited their design of Simula I and Simula 67 for ideas essential to the emergence of .

Standardization as Simula 67

The development of Simula 67 marked a pivotal transition from the earlier Simula I, which was primarily a simulation language implemented between 1963 and 1965 on the 1107 at the Norwegian Computing Center (NCC). Starting in 1965, efforts focused on refining the language to address limitations such as inefficient storage management and cumbersome element-set interactions, evolving it into a with full object-oriented capabilities. By 1967, the introduction of the class concept enabled the definition of objects encapsulating both data and procedures, supporting through subclasses and establishing Simula as the first language to implement comprehensive (OOP). This standardization culminated in the official report "SIMULA 67 Common Base Language," authored by , Bjørn Myhrhaug, and at the NCC, with the initial definition finalized in June 1967 following the Simula 67 held June 5 to 9 at the NCC. The report precisely defined the language's grammar and semantics, serving as the foundational specification for all subsequent implementations and ensuring portability across diverse systems. Established by the newly formed SIMULA Standards Group (SSG) in June 1967, with the formally approved at its first meeting in February 1968, it underwent minor revisions, such as the addition of handling and input/output facilities by April 1968, to broaden its applicability beyond . Key refinements in Simula 67 included the integration of coroutines to facilitate , achieved through statements like "detach" and "resume" that allowed quasi-parallel execution of independent processes within a environment. Additionally, prefix notation was introduced for blocks and classes, enabling concise hierarchical declarations—such as prefixing a "block" with a class to inherit its properties—while maintaining compatibility for control structures. These changes enhanced modularity and expressiveness, with coroutines supporting dynamic process activation and prefixing promoting reusable abstractions without altering the core block structure. Adoption accelerated following the SSG's inaugural meeting in February 1968, where the was formally frozen, leading to implementations on major systems like the and by 1968. The group, initially comprising NCC representatives and international collaborators such as those from , oversaw compliance and extensions, fostering widespread use in Nordic research projects and early efforts. By 1968, user communities began forming, exemplified by the SSG's role in coordinating the Nordic Simula Users Group, which promoted the language through conferences and shared resources.

Design principles

Object-oriented foundations

Simula introduced the class as the foundational construct in programming languages, serving as a unified mechanism that encapsulates both attributes and associated procedures, now commonly referred to as methods. This innovation allowed for the creation of modular, self-contained units that model real-world entities by bundling state and behavior, marking a departure from purely procedural paradigms like ALGOL 60. In Simula 67, a class declaration defines a blueprint specifying local (via type declarations) and procedures that operate on that , enabling the construction of complex systems through composition rather than global variables and separate functions. Classes in Simula function as templates for generating objects, where each object is an independent instance with its own space. Instantiation occurs dynamically using the new keyword, which allocates for the object and initializes it according to the class specification, returning a reference to the newly created entity. This approach supports runtime creation of multiple objects from the same class, each maintaining while sharing the common structure and behavior defined in the template. The mechanism ensures that objects can be referenced and manipulated indirectly, facilitating flexible program architectures without fixed compile-time structures. To achieve polymorphism, Simula incorporated virtual procedures, which enable late binding of method calls based on the actual type of the object at runtime rather than the type. A procedure declared as virtual within a class allows subclasses to override it, ensuring that the appropriate is invoked dynamically during execution. This semi-dynamic binding resolves the procedure call to the version defined in the object's specific class, promoting extensibility and reuse across class hierarchies. Virtual procedures thus provide the core enabler for polymorphic behavior, where objects of different classes can be treated uniformly through a . The prefix form in Simula's class activation further supports nested hierarchies by allowing one class to be prefixed to another, effectively creating a subclass that inherits all data and procedures from the prefix class while adding or modifying its own. This prefixing mechanism activates the base class's during the subclass's definition and instantiation, enabling layered abstractions where inner classes operate within the scope of outer ones. Such nesting facilitates the of deep, organized class structures, with each level building upon the previous to form increasingly specialized object types. For instance, via prefixing allows brief extensions of base classes, as explored in subsequent examples of class definitions.

Simulation-oriented features

Simula's simulation-oriented features were designed to facilitate and , enabling the representation of dynamic systems through interacting entities without requiring true hardware parallelism. Central to this is the use of , implemented via the Process class, which allows multiple to execute quasi-concurrently by interleaving their active phases. A process object can detach from the main execution chain using the detach statement, suspending its execution until reactivated, thus simulating concurrent activities in a single-threaded environment. This coroutine mechanism supports the modeling of independent yet interacting components, such as in where represent entities like customers or machines. Discrete event simulation in Simula advances time through event-driven mechanisms, primarily the hold and wait statements within the Process class. The hold(T) statement passivates the current process and schedules its resumption after a delay of T time units along the simulation's time axis, effectively advancing the global simulation time to the next event. Meanwhile, wait(S) passivates the process and inserts it into an ordered set S, typically a queue representing a resource contention point, where it remains until explicitly reactivated via an activate or resume statement. These statements ensure that simulation time progresses only when events occur, avoiding unnecessary computation during idle periods. The built-in Simulation and Process classes provide foundational support for event management and resource handling. The Simulation class, which extends the Simset class for two-way linked lists, establishes a global time axis and the sequencing set (SQS)—an event queue implemented as a priority-ordered Simset where event notices are ranked by their EVTIME attribute. The Process class, defined as a subclass of link within the Simulation class and incorporating coroutine capabilities, equips objects with properties for managing active phases, event notices, and states (active, passive, suspended, or terminated). Together, they enable efficient event queue operations, such as inserting and extracting processes based on simulation time, facilitating resource management through queue-like structures. These features found practical application in modeling , particularly in industrial simulations involving queues, servers, and entity interactions. For instance, in simulations of manufacturing environments, such as ASEA's models or paper mill lumber yards, processes could represent jobs or materials queuing for servers (resources), using wait to handle contention and hold to model processing times, thereby analyzing throughput and bottlenecks with . This approach allowed for scalable representations of complex interactions, influencing subsequent simulation languages and tools in .

Innovative mechanisms like call-by-name

One of Simula's key innovations in parameter passing is the support for call-by-name, an optional mechanism for procedure parameters that evaluates the actual argument only when the formal parameter is referenced during procedure execution. This approach, inherited and adapted from , performs a textual substitution of the actual parameter expression into the procedure body, allowing it to be re-evaluated dynamically each time it is used, which contrasts with call-by-value where the argument is evaluated once at the point of the call and a copy is passed. In practice, this enables , where computations are deferred until necessary, and facilitates higher-order functions by treating expressions as substitutable units rather than fixed values. The implementation of call-by-name in Simula relies on generating —small procedures that encapsulate the actual argument expression and its evaluation environment—for each formal parameter specified in this mode. Upon each reference to the formal parameter within the procedure, the corresponding thunk is invoked to compute and return the current value of the expression, ensuring that side effects or changes in the caller's context are reflected accurately. This thunk-based mechanism, while computationally expensive due to repeated evaluations and the overhead of thunk creation and invocation, provides significant flexibility for expressing complex scenarios where parameters might represent dynamic conditions or event-driven computations. Beyond parameter passing, Simula introduced detached tasks as a mechanism for independent process execution, allowing objects instantiated from classes to operate in a quasi-parallel manner decoupled from the main . A task becomes detached via the detach statement, transitioning to an autonomous state managed by its local sequence control, while the overall progresses through a central event queue; resumption occurs explicitly with resume on the object , enabling coroutine-like for modeling concurrent activities without true parallelism. This feature supports flexible simulation expressions by permitting tasks to suspend, resume, and interact via shared data structures, though it introduces overhead in storage management and sequencing to maintain block-structured scoping.

Language syntax and semantics

Basic program structure

Simula programs are organized using a block structure inherited from , where the main program forms a primary block consisting of a declaration section followed by a statement sequence. This structure allows for modular decomposition, with blocks serving as self-contained units that encapsulate local declarations and executable statements, supporting nested hierarchies for complex programs. The main block typically operates at the system level, initiating execution as a in a quasi-parallel environment. The outer block syntax employs the keywords begin and end to delimit the scope of declarations and statements, ensuring clear boundaries for visibility and execution. Declarations precede statements within the block head, including type specifications for variables such as integers or references, while the body contains the sequence of statements to be executed sequentially. Blocks may be prefixed by class declarations to integrate predefined functionality, such as input/output handling via the BasicIO class. For , Simula provides labels—defined as identifiers followed by a colon—and unconditional go to statements, which transfer execution to a labeled point within the same block instance. However, these unstructured mechanisms are discouraged in favor of structured alternatives like conditional statements and loops, aligning with the language's foundational role in promoting disciplined programming practices. Compilation units in Simula consist of separate blocks or class definitions that can be compiled independently, with the main program block linked to external classes via declarations such as external class. This allows programs to incorporate reusable components, such as simulation classes, while maintaining the overall structure as a cohesive prefixed block, often enclosed within a standard prefix like BASICIO for runtime support.

Data types and control flow

Simula supports a set of primitive data types that form the foundation for its expressions and variables, including , real, , and . The type represents whole numbers, including positive, negative, and zero values, with an optional short integer subtype that may be implemented as a subrange of the full type depending on the . Real numbers are handled by the real type for standard floating-point values, with an optional long real subtype for higher precision, also implementation-defined. The type accommodates only the values true and false, serving as the basis for logical operations and conditions. Text, used for character strings, is an ordered of characters that can be empty, with attributes like accessible via dot notation (e.g., T.length), and initialized to notext. Arrays in Simula are declared with a specified type and bounds, enabling multi-dimensional subscripted variables, such as [integer](/page/Integer) array A(1:10), where bounds checking occurs at runtime to prevent access errors outside the defined range. References, functioning as pointers to objects, are declared with a qualification like ref(ClassName), holding either a specific object or the special value none to indicate no object; they allow dynamic linking in simulations but require compatibility checks for assignments, such as ensuring subclass relationships. Simula employs static type checking where possible, enforcing strong typing by requiring exact type matches for assignments and operations, though implicit conversions are permitted among arithmetic types (e.g., to real) and explicit conversions via built-in procedures like entier for real to ; references introduce some flexibility but trigger runtime errors for invalid assignments. Control flow in Simula is managed through standard conditional and iterative constructs derived from influences, providing capabilities. The statement evaluates a to selectively execute one of two statements, with syntax if Boolean-expression then statement [else statement], where the else clause is optional; for example, if x > 0 then y := 1 else y := 0. The while-do loop repeats a statement as long as a condition holds, equivalent to a labeled if-then-goto structure for implementation, as in while Boolean-expression do statement. For loops offer versatile , assigning values to a simple variable via a for-right-part such as for i := 1 step 1 until n do statement, supporting value lists, steps, and until clauses for controlled repetition over ranges or collections. Switch statements facilitate selection based on an subscript, declared as switch switch-identifier := switch-list, where the list contains designational expressions (labels or procedure calls) indexed from 1, allowing goto-like transfers without direct labels; for instance, switch s := L1, L2, Q(5) selects based on s(2). Conditional expressions embed logic within expressions, yielding a value of the common type between alternatives, such as if x > 0 then 1 else 0.0, with type promotion to long real if either requires it to ensure consistency. These mechanisms support precise control in models, where loops and conditions often manage event sequencing.

Procedures and expressions

In Simula, procedures are defined using a syntax that closely resembles that of ALGOL 60, with the declaration beginning with the keyword procedure followed by the procedure identifier and an optional formal parameter list, terminated by a semicolon, specifications for parameter types and modes, and the procedure body enclosed between begin and end. For example, a simple procedure to compute the sum of two integers might be declared as procedure sum(a, b); integer a, b; sum := a + b; end;, where the specifications follow the parameter list to indicate types such as integer, real, boolean, text, or procedure. This structure allows procedures to encapsulate reusable code blocks, functioning similarly to subprograms in earlier languages while integrating with Simula's block-oriented design. Parameter transmission in Simula procedures supports multiple modes, with call-by-value as the default for value-type parameters like scalars (integers, reals, booleans), where a local copy of the actual 's value is created upon invocation, ensuring the original argument remains unchanged. For non-value types such as arrays, switches, or labels, the default shifts to call-by-reference, passing a reference to the original data structure, which allows modifications to affect the caller's variables. Call-by-name is an optional mode, explicitly specified for parameters that require textual substitution and re-evaluation each time the formal is referenced within the procedure body; this mode, inherited from , is particularly useful for passing expressions or procedure parameters but is restricted to non-value types to avoid implementation complexities. Expressions in Simula are evaluated according to rules derived from ALGOL 60, with arithmetic expressions using standard infix notation and operators such as + (addition), - (subtraction), * (multiplication), / (real division), // (integer division), and ** (exponentiation), processed from left to right subject to operator precedence where exponentiation has the highest priority, followed by multiplication and division, then addition and subtraction. Procedure calls and certain constructs like conditional expressions employ prefix notation, where the operator or procedure name precedes its arguments, as in if boolean-expression then statement1 else statement2. Boolean expressions combine relational operators (=, /=, <, <=, >, >=) and logical operators (and, or, not), evaluated similarly with short-circuiting not supported, ensuring all subexpressions are computed unless syntactically avoided. Variables declared within a procedure have local scope, visible only inside that procedure's body and any nested blocks, promoting encapsulation and preventing unintended interactions. Access to outer (global) variables is achieved through lexical scoping, where non-local identifiers retain their meaning from enclosing blocks unless shadowed by local declarations, enabling procedures to interact with program-wide state while maintaining . This scoping mechanism aligns with Simula's block structure, treating procedures as special cases of blocks for rules.

Programming examples

Minimal executable program

The minimal executable program in Simula demonstrates the language's fundamental block structure, consisting of a simple declaration, assignment, and termination without any input/output operations or advanced features. This program compiles and runs successfully but produces no visible output, serving as a basic test of the and runtime environment. Here is the simplest valid example:

Begin Integer x; x := 1; End

Begin Integer x; x := 1; End

In this program, the Begin keyword initiates a block, which is the core organizational unit in Simula for enclosing declarations and statements. The declaration [Integer](/page/Integer) x; introduces a simple integer variable named x, adhering to Simula's type-specific declaration syntax where the type precedes the identifier. The assignment x := 1; uses the := operator to bind the value 1 to the variable x, performing a basic value assignment without side effects. Finally, the End keyword terminates the block, completing the program's execution. The purpose of this minimal program is to illustrate Simula's essential syntax for variable handling and block scoping, derived from its ALGOL 60 heritage, while avoiding any simulation or object-oriented constructs. It highlights the language's procedural foundation, where programs are structured as nested blocks that can be prefixed with classes like Direct or Simulation for more complex applications, though such prefixes are optional for this basic case. A variation to verify compilation and execution involves adding a basic output statement, such as OutInteger(x);, which would display the value 1 if the program is prefixed with the BasicIO class, but this extends beyond the pure minimal structure.

Hello world demonstration

A canonical demonstration of basic output in Simula is the "Hello, World!" program, which utilizes the language's standard input/output facilities to display a simple text message on the console. The following code exemplifies this:

simula

Begin OutText("Hello, World!"); OutImage; End

Begin OutText("Hello, World!"); OutImage; End

This program follows the basic structure of a main block enclosed by Begin and End statements. The OutText procedure, part of Simula's standard I/O , accepts a (enclosed in double quotes) as its argument and transfers the contents to the output buffer by sequentially retrieving and writing each character using low-level operations like getchar. If the buffer position would overflow due to the text length, OutText automatically invokes OutImage to flush the current line before continuing. The explicit call to OutImage then flushes the accumulated output from the internal image buffer (a text frame) to the standard output stream (Sysout), ensuring the message is displayed, followed by a . Simula's text handling relies on the built-in text type, which represents dynamic sequences of characters managed through frames with attributes like length, pos (position), and methods such as setpos, getchar, and more for traversal. Procedures like OutText and its counterpart InText (for input) were integral to Simula since its development in the 1960s, enabling formatted reporting of simulation results and data interchange in early computing environments. For extended output, Simula provides procedures like OutInt to format and display integer values alongside text; for instance, OutInt(42, 5); OutImage; would output the number right-justified in a field of width 5. This allows simple mixed-type demonstrations while adhering to the language's buffered, file-oriented I/O model.

Class definition and

In Simula, classes are defined using the class keyword followed by an optional prefix for , formal parameters, attribute declarations, and a body containing procedures and statements. This structure encapsulates data and behavior into reusable units, forming the basis for object creation. The language employs a block-structured syntax inherited from , where the class body is delimited by begin and end. A representative example is a Point class representing a two-dimensional point with coordinates:

simula

class Point (x, y); real x, y; begin virtual: procedure Move (dx, dy); real dx, dy; begin x := x + dx; y := y + dy; end; end;

class Point (x, y); real x, y; begin virtual: procedure Move (dx, dy); real dx, dy; begin x := x + dx; y := y + dy; end; end;

Here, x and y are attributes passed as formal parameters during instantiation, and Move is declared as a virtual procedure, enabling it to be overridden in subclasses for at runtime. Virtual procedures support polymorphism by resolving calls based on the actual object type rather than the reference type. Inheritance in Simula is achieved through prefixing, where a subclass declares the parent class before its own identifier, inheriting all attributes and procedures while allowing extensions or overrides. Simula implements a single inheritance model, permitting only one parent class per subclass to maintain a linear . For instance, a Circle subclass can extend Point by adding a radius attribute and overriding the Move procedure to adjust the center:

simula

Point class Circle (x, y, radius); real x, y, radius; begin procedure Move (dx, dy); real dx, dy; begin ! (inherited from Point); OutText ("Circle moved to ("); OutReal (x, 3, 5); OutText (", "); OutReal (y, 3, 5); OutText (") with radius "); OutReal (radius, 3, 5); OutImage; end; end;

Point class Circle (x, y, radius); real x, y, radius; begin procedure Move (dx, dy); real dx, dy; begin ! (inherited from Point); OutText ("Circle moved to ("); OutReal (x, 3, 5); OutText (", "); OutReal (y, 3, 5); OutText (") with radius "); OutReal (radius, 3, 5); OutImage; end; end;

The ! notation invokes the parent's implementation before or after subclass-specific code, ensuring behavioral extension. Objects are instantiated using the new operator, which allocates and initializes attributes with provided actual parameters, returning a to the object. are declared with the ref type qualifier. An example program demonstrating instantiation and method calls:

simula

begin ref (Point) p; ref (Circle) c; p := new Point (1.0, 2.0); c := new Circle (3.0, 4.0, 5.0); inspect p do Move (1.0, 1.0); inspect c do Move (2.0, 2.0); end;

begin ref (Point) p; ref (Circle) c; p := new Point (1.0, 2.0); c := new Circle (3.0, 4.0, 5.0); inspect p do Move (1.0, 1.0); inspect c do Move (2.0, 2.0); end;

The inspect statement provides scoped access to the object's attributes and methods, allowing calls like Move to invoke the appropriate virtual procedure dynamically— the base version for p and the overridden version for c. This mechanism exemplifies Simula's pioneering support for late binding in .

Discrete event simulation

Simula's discrete event simulation framework is centered on the Simulation class, which manages an ordered event list of processes scheduled by their activation time (EvTime), ensuring chronological execution of events. Core Simula provides basic simulation via the Simulation and Process classes, while extensions like DEMOS add advanced resource management and entity modeling. Processes, defined as subclasses of the Process class, represent active entities like customers or servers, and can be suspended and rescheduled using statements such as Hold, Activate, and Passivate. The Hold mechanism advances the global simulation clock by a specified duration, suspending the current process and reinserting it into the event list at the future time, which models time progression in systems like queues. Random distributions are integrated for realistic modeling of stochastic elements, such as arrival and service times. The NegExp function generates values from a negative exponential distribution, suitable for Poisson processes in queueing models, where the mean inter-arrival time determines the rate parameter. Other distributions like Normal or Uniform can be used similarly with Hold to vary service durations. A representative queueing model in Simula simulates a simple single-server system, such as a barber shop, where customers arrive, are served, and depart. This can be implemented using the DEMOS extension for and event scheduling, treating the server as a with capacity 1. The following code snippet, adapted from standard single-server queue examples in Simula , defines the core components (assuming DEMOS is loaded as an external class):

external class Demos = 'demos'; ! Path to DEMOS library Demos begin ref(res) server; server :- new res('server', 1); entity class Customer; begin server.[acquire](/page/Acquire)(1); Hold(15.0); ! Fixed service time of 15 units server.[release](/page/Kylie_Live_in_New_York)(1); end***Customer***; ! Schedule customers and run [simulation](/page/Simulation) new Customer('c1').schedule(0.0); Hold(65.0); ! Run for 65 time units end;

external class Demos = 'demos'; ! Path to DEMOS library Demos begin ref(res) server; server :- new res('server', 1); entity class Customer; begin server.[acquire](/page/Acquire)(1); Hold(15.0); ! Fixed service time of 15 units server.[release](/page/Kylie_Live_in_New_York)(1); end***Customer***; ! Schedule customers and run [simulation](/page/Simulation) new Customer('c1').schedule(0.0); Hold(65.0); ! Run for 65 time units end;

In this setup, the event list is maintained by DEMOS, ordering activations by EvTime and handling resource waits via internal queues. The acquire and release operations manage the server's availability, suspending customers if occupied. To gather output statistics, users implement counters within processes or leverage DEMOS reporting facilities. For stochastic models with exponential arrivals (mean 5 units) and service (mean 4 units) over 100 time units, the system utilization is ρ = 0.8; expected throughput is around 20 customers, with average wait time in queue approximately 16 units per the M/M/1 Wq = ρ / (μ (1 - ρ)). These metrics provide insights into queue performance, such as the probability of idle server time or maximum queue length.

Implementations and tools

Historical compilers

The first Simula compiler was developed in 1965 at the Norwegian Computing Center for the , implemented as an extension of the compiler under a with Sperry Rand Corporation. This implementation rendered Simula I fully operational by January 1965, enabling initial simulation applications on the UNIVAC hardware. Subsequent ports expanded Simula's reach. In 1968, the was adapted for the 1108, transitioning from the original 1107 while maintaining compatibility with the base. An implementation for the , known as SIMULA/IBM, was also developed during this period, supporting the growing adoption of mainframes for Simula programs. In the Nordic region, specialized implementations facilitated local use. SSIMULA targeted systems, while DSIMULA was created for DEC hardware, reflecting efforts to tailor Simula to prevalent regional environments. Additionally, an agreement in 1967 between Control Data A/S and the Norwegian Computing Center led to a Simula 67 for CDC systems, including the 6600, broadening availability on high-performance machines. These early compilers were inherently machine-specific, with implementations tied closely to particular hardware architectures and lacking a unified standard runtime environment, which hindered cross-platform portability until later efforts. The Simula 67 standard, formalized in 1967, provided a reference for these developments but did not immediately resolve runtime inconsistencies.

Modern interpreters and extensions

In the , efforts to revive Simula have focused on open-source implementations that enhance accessibility and portability, primarily through -based tools and web environments. The Portable Simula Revisited project, initiated around 2017 following a lecture by at Simula's 50th anniversary celebration, provides an open-source Simula compiler written in pure . This compiler adheres to the 1985 Simula Standard, which extends Simula 67 with features like constant declarations and advanced text manipulation (e.g., the Start procedure and concatenation operator &), while maintaining core concepts such as classes, , and via the SIMULATION class. It compiles Simula directly to Java class files using the Java Class File , enabling execution on the without additional runtime dependencies beyond Java 25 or higher (updated as of April 2025). Portable Simula integrates seamlessly with modern Java ecosystems, leveraging features like virtual threads from Project Loom to optimize performance in large-scale simulations; for instance, it reduces execution time for process-heavy programs like PrimeUnder with one million instances. This allows Simula code to benefit from 's garbage collection and multithreading, effectively bridging legacy simulation logic with contemporary hardware. Additionally, it reconstructs and supports legacy code from the S-Port Simula system, originally developed by the Norwegian Computing Center, ensuring compatibility for historical programs by handling older syntax and runtime behaviors through an optional Simula backend. Complementing these, GNU Cim serves as another open-source compiler for Simula, translating source code to C for compilation with standard C tools, and remains available on platforms like Linux distributions as of 2025, though its last major update was in 2009. Active forks, such as Cim-Open and the GitHub repository by sergev, provide maintained alternatives with ongoing development. For educational purposes, web-based environments have emerged, including the Tutorials Point Online Simula Compiler, which allows browser-based editing, compilation, and execution of Simula code without local setup. Similarly, Try It Online (TIO) supports Simula via GNU Cim integration, facilitating quick testing and sharing of programs in an online REPL-like interface. These tools provide partial support for Simula 67 constructs in research and teaching contexts, such as class hierarchies and coroutines, often within Java bindings that expose Simula objects as Java classes for hybrid applications. Overall, these modern implementations prioritize compatibility with legacy Simula code for historical simulations and research, while extending usability through Java interoperability and , without altering the language's foundational object-oriented and simulation paradigms.

Availability and compatibility

Simula remains accessible today through several modern platforms and tools, enabling users to experiment with the without historical hardware. Web-based s, such as the online Simula compiler at Tutorials Point, allow users to write, compile, and execute Simula code directly in a , supporting basic program development and testing. For local installation, the GNU Cim compiler provides a free, open-source implementation of Simula 67 with extensions to the 1986 standard, which can be built from source on and other systems using standard tools like and . This approach supports execution on contemporary hardware, though users may need to manage dependencies manually. Additionally, emulators for vintage systems, such as the UNIVAC 1100 series emulator available on , enable running original Simula binaries from the 1960s and 1970s on modern machines. For the , historical emulation documentation from 1977 exists, but modern open-source emulators are limited. Compatibility with modern environments is constrained by Simula's design roots in . Implementations adhere to the ISO character set, supporting primarily ASCII characters (codes 32–126) for and output, with no full support; non-ASCII characters, including most control codes (0–31 except format effectors like TAB and LF), are illegal and trigger errors. As a superset of , Simula offers broad compatibility with syntax and semantics, but some implementations provide only partial support for the full ALGOL subset due to Simula-specific extensions like classes and coroutines, potentially requiring adjustments for pure ALGOL code. Educational resources facilitate learning and historical exploration, including comprehensive tutorials like "An Introduction to Programming in Simula," which covers the 1985 standard with examples and exercises. The SIMULA Site offers online references, sample programs, and tools for beginners, while virtual machines and emulators—such as those for hardware—allow execution of original binaries to study legacy simulations. Modern interpreters, detailed elsewhere, further enhance cross-platform access.

Legacy and influence

Impact on object-oriented programming

Simula 67, released in 1967, is widely recognized as the first programming language to incorporate classes and objects as fundamental constructs, predating Smalltalk's development in the early 1970s. Developed by Ole-Johan Dahl and Kristen Nygaard at the Norwegian Computing Center, it extended ALGOL 60 to support these features primarily for simulation purposes, but their generality enabled broader application in structured programming. This introduction marked Simula as the birthplace of object-oriented programming (OOP) in computing history, earning Dahl and Nygaard the 2001 ACM A.M. Turing Award for pioneering OOP concepts that revolutionized software design. Simula exported core OOP principles that became foundational to the paradigm, including encapsulation through class-defined data and procedures, via class prefixing to share common attributes and behaviors, and polymorphism achieved with virtual procedures for dynamic binding at runtime. These mechanisms allowed objects to act as autonomous units with internal state and operations, promoting and reusability in complex systems like discrete event simulations. For instance, virtual procedures enabled subclasses to override parent behaviors without altering the original class structure, a flexibility that addressed limitations in earlier procedural languages. The academic influence of Simula is evident in the seminal papers by Dahl and Nygaard, such as their 1966 Communications of the ACM article on Simula as a simulation language and the 1968 paper on classes and co-routines, which articulated OOP's theoretical underpinnings and directly informed subsequent research. These works shaped OOP textbooks and curricula, providing the conceptual framework for encapsulation, , and late binding that educators and researchers adopted to teach object orientation as a for modeling real-world entities. By the , Simula's ideas had permeated education, establishing OOP as a dominant approach in and influencing the design of languages that prioritized and extensibility.

Influence on subsequent languages

Simula's innovations in profoundly shaped subsequent languages, both directly and indirectly. One direct successor was the BETA programming language, developed in the 1980s at the University of in by researchers including Ole Lehrmann Madsen, Birger Møller-Pedersen, and . BETA extended Simula's class-based model with a more unified approach to objects, incorporating nested classes, patterns for dynamic instantiation, and improved support for concurrent programming while retaining strong static typing. Indirectly, Simula influenced Smalltalk, pioneered by at PARC in the . explicitly credited Simula as a major inspiration for Smalltalk's object-oriented design, particularly its use of classes and to model dynamic systems, as noted in his 1990 where he described demonstrating Smalltalk to Simula co-creator , who recognized the conceptual lineage immediately. This influence helped evolve OOP from simulation tools to a general emphasizing message-passing and encapsulation. Simula's class-inheritance model also informed C++, created by starting in 1979 at . Stroustrup, who had used Simula 67 for simulations during his PhD, designed C++ to integrate Simula's facilities for program organization—such as classes, , and virtual functions—with C's efficiency for . He stated that "C++ was designed to provide Simula’s facilities for program organization together with C’s efficiency and flexibility," directly adopting Simula's approach to type-safe polymorphism while prioritizing performance. Similarly, , developed by and his team at in the early , drew heavily from Simula's OOP foundations. Gosling, who first encountered Simula as a and later described falling in love with its elegant class and inheritance mechanisms, incorporated these into Java's design to enable platform-independent, robust object-oriented development. He acknowledged Simula as a major influence during a 2017 lecture at Simula's 50th anniversary, highlighting how its concepts shaped Java's emphasis on classes, interfaces, and inheritance. Beyond OOP, Simula's call-by-name parameter passing, inherited from but refined for object contexts, prefigured strategies in functional languages.

Contemporary applications and research

Despite its historical roots, Simula maintains niche applications in legacy simulations for shipping and , where modern interpreters enable the execution of original codebases for validation and analysis. For instance, Portable Simula Revisited, an open-source Java-based implementation, allows researchers to run and study classic Simula programs from the and 1970s designed for shipyard and discrete event simulations in industrial operations. In academic research, Simula continues to be a focal point in studies on the history of (OOP), highlighting its pioneering role in introducing classes, objects, and . Recent analyses, such as those exploring Simula's original intent for problem-oriented versus contemporary OOP paradigms, underscore its enduring conceptual influence while critiquing modern deviations from its simulation-focused design principles. These studies often draw on archival code and documentation to trace how Simula's coroutines and dynamic binding shaped subsequent paradigms, with over 50 years of scholarship affirming its foundational status. The language has seen revival in education through online tools and interpreters like Portable Simula Revisited, which facilitate teaching OOP concepts and simulation techniques to students without requiring obsolete hardware. Initiated following a 2000 lecture by Simula co-creator Ole-Johan Dahl at the University of Oslo, this project provides a portable environment for compiling and executing Simula code, enabling interactive exploration of historical programs in modern curricula focused on programming language evolution. Educational applications emphasize hands-on simulation exercises, bridging theoretical history with practical coding to illustrate early OOP mechanics. Ongoing open-source projects, such as a C++ and Qt-based parser, code model, LuaJIT compiler, and IDE for Simula 67 initiated around 2019 and active as of 2025, further support educational and research exploration of the language. Modern projects include extensions for parallel simulation, building on Simula's process-oriented model to support distributed discrete event simulations. For example, research into parallelizing Simula-based applications proposes methodologies for concurrent execution on multiprocessor systems, adapting the language's inherent simulation structures for contemporary needs. Additionally, inspired implementations like the Simulus Python library extend Simula's concepts to parallel and distributed environments, allowing interactions in multi-simulator setups for scalable modeling. Challenges in maintaining Simula codebases persist, particularly in industries with long-standing simulation dependencies, where compatibility issues with modern systems necessitate ongoing porting efforts using tools like Portable Simula. In , where Simula originated, legacy code from early industrial applications requires specialized expertise to ensure reliability in operational contexts.

References

Add your contribution
Related Hubs
User Avatar
No comments yet.