Share to: share facebook share twitter share wa share telegram print page

Simula

Simula
ParadigmsMulti-paradigm: procedural, imperative, structured, object-oriented
FamilyALGOL
Designed byOle-Johan Dahl
DeveloperKristen Nygaard
First appeared1962; 62 years ago (1962)
Stable release
Simula 67, Simula I
Typing disciplineStatic, nominative
ScopeLexical
Implementation languageALGOL 60 (primarily; some components Simscript)
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]

Simula 67 introduced objects,[1]: 2, 5.3  classes,[1]: 1.3.3, 2  inheritance and subclasses,[1]: 2.2.1  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[3] 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. The influence of Simula is often understated, and Simula-type objects are reimplemented in C++, Object Pascal, Java, C#, and many other languages. Computer scientists such as Bjarne Stroustrup, creator of C++, and James Gosling, creator of Java, have acknowledged Simula as a major influence.[4]

History

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 formal computer 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 simulation language 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

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.[7]

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[8]
  • Portable Simula Revisited[9]

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.

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,[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

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

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.

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

  1. ^ a b c d e f g h i j k l m n Dahl, Ole-Johan; Myhrhaug, Bjørn; Nygaard, Kristen (1970). Common Base Language (PDF) (Report). Norwegian Computing Center. Archived from the original on 2013-12-25. Retrieved 17 November 2020.{{cite report}}: CS1 maint: unfit URL (link)
  2. ^ Nygaard, Kristen (1978). "The Development of the Simula Languages" (PDF). The development of .. SIMULA I and SIMULA 67... were influenced by the design of SIMSCRIPT ...
  3. ^ 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
  4. ^ Wong, William. "Before C, What Did You Use?". Electronic Design. Retrieved 22 May 2017.
  5. ^ Holmevik, Jan Rune (1994). "Compiling Simula: A historical study of technological genesis" (PDF). IEEE Annals of the History of Computing. 16 (4): 25–37. doi:10.1109/85.329756. S2CID 18148999. Retrieved 12 May 2010.
  6. ^ 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.
  7. ^ 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. ISBN 978-3-662-44471-9. S2CID 1000741.
  8. ^ "GNU Cim".
  9. ^ "Portable Simula Revisited". GitHub. Retrieved 17 June 2019.
  10. ^ "ACM Ole-Johan Dahl and Kristen Nygaard - Obituary". Acm.org. Archived from the original on 19 July 2011. Retrieved 14 January 2012.
  11. ^ "ACM Turing Award Lectures". Informatik.uni-trier.de. Retrieved 14 January 2012.

Sources

Further reading

Read other articles:

Martinice Localidad BanderaEscudo MartiniceLocalización de Martinice en República ChecaCoordenadas 49°22′18″N 16°02′18″E / 49.371725382357, 16.038231687127Entidad Localidad • País  República Checa • Región Vysočina • Distrito Žďár nad SázavouSuperficie   • Total 6,04 km² Altitud   • Media 503 m s. n. m.Población (1 de enero de 2023)   • Total 461 hab. • Densidad 76,27 hab/km

  Phalaenopsis parishii TaxonomíaReino: PlantaeSubreino: TracheobiontaDivisión: MagnoliophytaClase: LiliopsidaSubclase: LiliidaeOrden: AsparagalesFamilia: OrchidaceaeSubfamilia: EpidendroideaeTribu: VandeaeSubtribu: SarcanthinaeAlianza: PhalaenopsisGénero: PhalaenopsisEspecie: Phalaenopsis lindeniiRchb.f. 1865[editar datos en Wikidata] Phalaenopsis parishii Rchb.f. 1865 es una orquídea del género Phalaenopsis de la subfamilia Epidendroideae de la familia de las Orchidaceae...

Venezuelan fencer Silvio FernándezFernández at the Masters épée 2012Personal informationBorn (1979-01-09) 9 January 1979 (age 44)Caracas, VenezuelaNationalityVenezuelanHeight1.90 m (6 ft 3 in)Weight80 kg (176 lb)SportSportFencingWeaponépéeHandright-handedFIE rankingcurrent ranking Medal record Men’s Fencing Representing  Venezuela Pan American Games 2007 Rio de Janeiro Team épée 2011 Guadalajara Team épée 2007 Rio de Janeiro Épée 2011 Guad...

Олексій Мячеславович Данілов Олексій Мячеславович Данілов 13-й Секретар Ради національної безпеки і оборони України Нині на посадіНа посаді з 3 жовтня 2019Президент Володимир ЗеленськийПрем'єр-міністр Олексій ГончарукДенис ШмигальПопередник Олександр Данилюк 6-й Голова Л

Tampilan interior Museum Grand Prix, Makau Grand Prix Museum merupakan museum yang dibangun untuk merayakan peringatan ke-40 tahun Grand Prix Makau, museum ini dibuka pada tahun 1993 di Makau. Grand Prix Makau mengadakan sejumlah balapan mobil dan balapan sepeda motor yang diadakan setiap tahunnya pada bulan November. Dalam perayaan Grand Prix Makau yang ke-50, Grand Prix Museum telah direnovasi oleh Kantor Pemerintah Makau secara besar-besaran dan mengalami modernisasi museum.[1] Sej...

Streckennetz der Bergisch-Märkischen Eisenbahn-Gesellschaft kurz vor der Verstaatlichung Die Bergisch-Märkische Eisenbahn-Gesellschaft[1] (kurz BME, auch: Bergisch-Märkische Eisenbahngesellschaft) gehörte mit der Köln-Mindener Eisenbahn-Gesellschaft und der Rheinischen Eisenbahn-Gesellschaft zu den drei großen (nominell) privaten Eisenbahnunternehmen, die ab der Mitte des 19. Jahrhunderts vor allem das Rheinland, das Ruhrgebiet und große Teile Westfalens durch die Eisenbahn ers...

Peta BumiGeografi adalah ilmu yang mempelajari tentang hubungan, persamaan, dan perbedaan antar ruang di Bumi.[1] Pusat kajian geografi adalah hubungan manusia dan lingkungannya. Secara umum, geografi terbagi menjadi dua cabang keilmuan, yaitu geografi fisik dan geografi manusia. Setelah tahun 1945, geografi lebih diarahkan ke ilmu sosial dan mengutamakan kajian tentang geografi manusia.[2] Geografi memiliki konsep-konsep penting yang digunakan untuk memahami hubungan, bentuk,...

Chapada dos Guimarães Municipio MapaCoordenadas 15°27′39″S 55°45′00″O / -15.460833333333, -55.75Capital Chapada dos GuimarãesEntidad Municipio • País  Brasil • Estado  Mato Grosso • Mesorregión Centro-sur Mato-Grossense • Microrregión CuiabáEventos históricos 31 de julio • Fundación 31 de julio de 1954Superficie   • Total 6.206,573 km²Altitud   • Media 798 m s. n. m.Clima TropicalPoblación...

Liga dos Campeões da AFC de 2022 2022 AFC Champions League (em inglês) Dados Participantes 49 Período 8 de março – 6 de maio de 2023 Gol(o)s 384 Partidas 130 Média 2,95 gol(o)s por partida Campeão Urawa Red Diamonds (3º título) Vice-campeão  Al-Hilal Melhor marcador Edmilson Júnior (8 gols) Público 511 549 Média 3 935 pessoas por partida Premiações Melhor jogador Hiroki Sakai ◄◄ 2021 2023–24 ►► A Liga dos Campeões da AFC de 2022 foi a 41ª edição do...

Artikel ini sebatang kara, artinya tidak ada artikel lain yang memiliki pranala balik ke halaman ini.Bantulah menambah pranala ke artikel ini dari artikel yang berhubungan atau coba peralatan pencari pranala.Tag ini diberikan pada Januari 2023. Artikel ini tidak memiliki referensi atau sumber tepercaya sehingga isinya tidak bisa dipastikan. Tolong bantu perbaiki artikel ini dengan menambahkan referensi yang layak. Tulisan tanpa sumber dapat dipertanyakan dan dihapus sewaktu-waktu.Cari sumber:...

Artikel ini tidak memiliki bagian pembuka yang sesuai dengan standar Wikipedia. Mohon tulis paragraf pembuka yang informatif sehingga pembaca dapat memahami maksud dari Museum Prangko Indonesia. Contoh paragraf pembuka Museum Prangko Indonesia adalah .... (Pelajari cara dan kapan saatnya untuk menghapus pesan templat ini) Museum Prangko dihiasi sejumlah ukiran dan patung gaya Bali dan Jawa, dikelilingi pagar tembok dengan dua pintu gerbang yang mengambil model dasar candi bentar. Di sayap kan...

Japanese manga series Boys Be...First tankōbon volume coverGenreComing-of-age[1]Romantic comedy[2][3]Slice of life[1][4] MangaWritten byMasahiro ItabashiIllustrated byHiroyuki TamakoshiPublished byKodanshaEnglish publisherNA: Tokyopop[a]ImprintShōnen Magazine ComicsMagazineWeekly Shōnen MagazineDemographicShōnenOriginal runAugust 7, 1991 – March 14, 2001Volumes58 Series titles Boys Be... (1991–1996; 32 volumes) Boys Be... ...

Aspect of military life Insignia for Christian, Muslim, and Jewish chaplains (left to right) are shown on the uniforms of three U.S. Navy chaplains, 1998. These were the only insignia in use at that time. Religious symbolism in the United States military includes the use of religious symbols for military chaplain insignia, uniforms, emblems, flags, and chapels; symbolic gestures, actions, and words used in military rituals and ceremonies; and religious symbols or designations used in areas su...

The Creation of the World and Other Business is a play by Arthur Miller first performed in 1972. Summary The play is a parable that explores the theme of good-versus-evil by way of a comedic retelling of events in the Book of Genesis in the Bible. The first act is set in the Garden of Eden, where God creates Eve for Adam. God wants the couple to procreate, but doesn't know how to entice them into starting the process. Onto the scene comes Lucifer, who believes the existence of evil will make ...

В Википедии есть статьи о других людях с такой фамилией, см. Сосин. Пётр Ильич Сосин Пётр Ильич Сосин Дата рождения 21 апреля 1936(1936-04-21) Место рождения поселок Мстёра, Владимирская область, СССР Дата смерти 20 февраля 2008(2008-02-20) (71 год) Гражданство  СССР Жанр миниатюра Стил...

2005 Bengali film SangramTheatrical release posterSangramDirected byHaranath ChakrabortyWritten byStory:Snehasis Chakraborty Screenplay & Dialogues:Subhash senProduced byMukul SarkarStarringJisshu SenguptaProsenjit ChatterjeeRanjit MallickCinematographyV. PrabhakarEdited bySwapan GuhaMusic bySongs:Ashok BhadraScore:S.P. VenkateshDistributed byT.Sarkar ProductionsRelease date2005CountryIndiaLanguageBengali Sangram is a 2005 Bengali vigilante action thriller film directed by Haranath Chakra...

Penganut agama di dunia pada 2020[1] Agama Persentase Kristen    31,11% Islam    22,90% Tidak terafiliasi    15,58% Hindu    15,16% Buddha    6,62% Agama lokal    5,61% Lainnya    2,79% Berikut ini adalah demografi jumlah penganut agama di dunia, berdasarkan benua, negara dan kawasan tertentu. Daftar ini tidak memuat jumlah denominasi agama (seperti Kristen Katolik, Islam Sunni, Kristen Protestan, Islam Syiah, Kristen Ortodoks, Islam Ah...

Town in Powys, Wales Human settlement in WalesMontgomeryWelsh: TrefaldwynView of Montgomery with Montgomery Castle in the backgroundMontgomeryLocation within PowysPopulation1,295 (2011 census)[1]OS grid referenceSO221967Principal areaPowysCountryWalesSovereign stateUnited KingdomPost townMONTGOMERYPostcode districtSY15Dialling code01686PoliceDyfed-PowysFireMid and West WalesAmbulanceWelsh UK ParliamentMontgomeryshireSenedd Cymru – Welsh Parlia...

Phylum of segmented worms AnnelidaTemporal range: Early Cambrian– Recent PreꞒ Ꞓ O S D C P T J K Pg N Glycera sp. Scientific classification Domain: Eukaryota Kingdom: Animalia Clade: Bilateria Clade: Nephrozoa (unranked): Protostomia (unranked): Spiralia Superphylum: Lophotrochozoa Phylum: AnnelidaLamarck, 1809 Classes and subclasses Cladistic view Palaeoannelida Chaetopteriformia Amphinomida Sipunculida Lobatocerebrum Pleistoannelida Myzostomida Errantia Protodriliformia Aciculata Phyll...

Lebanese artist Aziz AbdoBackground informationBirth nameAziz Abdoعزيز عبدوBorn1977Beirut, LebanonGenresArabic pop, Latin popOccupationsActor, model, singer-songwriterInstrumentsVocalsYears active1997–presentMusical artist Aziz Abdo (Arabic: عزيز عبدو, born 1977)[1] is a Lebanese singer, actor, model, and beauty pageant titleholder.[2][3] Abdo's family emigrated to Sweden where he debuted his modeling career. He moved back to Lebanon at the age of 20 ...

Kembali kehalaman sebelumnya