コンテンツにスキップ

Simula

出典: フリー百科事典『ウィキペディア(Wikipedia)』
Simula
Simula
Simulaのロゴ
パラダイム マルチパラダイム: 構造化プログラミングオブジェクト指向プログラミング
登場時期 1967年
設計者 Ole-Johan DahlKristen Nygaard
最新リリース Standard SIMULA / 1986年8月25日[1]
主な処理系 GNU Cim
影響を受けた言語 ALGOL 60
影響を与えた言語 Smalltalkをはじめとするオブジェクト指向プログラミング言語
テンプレートを表示

SIMULA; SIMUlation LAnguageALGOL601960[2]

ALGOLbegin ... endblockinstanceclassobject[3]

[]


19621967Simula  Simula I  Simula67  ALGOL60 /Simula Simulasimulation languagesimple universal language

使Smalltalk  Simula C++ C Simula 



Simula67  

Simula  Simula 使Simula  Simula 70使 Simula Simula 

VLSI Simula Simula  C++JavaC# Simula C++ BCPL Simula C++  Simula67

[]


19571962119623 SIMULA I 

UNIVAC  UNIVAC 1107 19623 UNIVAC  Simula  ALGOL Simula IFIP2SIMULA  An Extension of ALGOL to the Description of Discrete-Event Networks

 UNIVAC SIMULA I UNIVAC 1107 19638 UNIVAC  ALGOL6019651 UNIVAC 1107  SIMULA I 2 Simula Simula SIMULA I   B5000  URAL-16 

196619673 IFIP  Simula6719676SIMULA 67  SIMULA  (SSG) 19682

Simula  Smalltalk Simula 

6070 Simula 4

UNIVAC 1100 Norwegian Computing Center (NCC) 

Sysmtem/360  System/370  (FOA) 

CDC 3000  Joint Computer Installation 

TOPS-10 ENEA AB 

TOPS-10  publicprotectedprivate  Simula87Simula873

Simula AS

Lund Simula

GNU Cim

200111 (IEEE) SIMULA 67 20022 Simula I  Simula 67 2001ACM68[4] OOPSLA 2002ACM

 Simula 2001

[]

[]


 Simula 1


Begin
End ;

Simula  return 

 Hello World[]


Simula Hello world Simula 
Begin
OutText ("Hello World!") ;
Outimage ;
End ;

典型的サブクラスと仮想関数[編集]

クラス、サブクラス、仮想関数を用いた現実的な例を以下に示す。

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 ;

1Glyph2Char, Line12Simula 

[]


Simula call by name Jensen's Deviceen:Jensen's DeviceALGOLcall by valueJensen's Device


Real Procedure Sigma (l, m, n, u) ;
   Name l, u ;
   Integer l, m, n ;
   Real u ;
   Begin
   Real s ;
   l:= m ;
   While l <= n Do
      Begin
      s := s + u ;
      l := l + 1 ;
      End ;
   Sigma := s ;
   End ;

lu使Simula  for  while 使



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

シミュレーション[編集]


Simula Simula

 SamSallyAndy 13123使
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;

 Simulation 

door使使Wait (door)Activate door.firstdoor.First.Out

Person  Process  hold

 Person 100

[]



(一)^ URL: https://portablesimula.github.io/github.io/

(二)^ Dahl & Nygaard (1966)

(三)^  (1975), p. 202

(四)^ Patrick J. De Blasi (2002729). 2001 TURING AWARD WINNERS SUCCUMB WITHIN TWO MONTHS OF EACH OTHER. 2002104202443

[]


Dahl, Ole-Johan; Nygaard, Kristen (1966-09-01). SIMULAan ALGOL Based Simulation Language. Communications of the ACM 9 (9): 671678. doi:10.1145/365813.365819. ISSN 0001-0782. http://www.znu.ac.ir/cv/afsharchim/lectures/artikkel1966cacm.pdf. 

Ole-Johan Dahl; Bjørn Myhrhaug; Kristen Nygaard (1970). SIMULA Common Base Language. 2015-04-02. https://web.archive.org/web/20150402202054/http://www.eah-jena.de/~kleine/history/languages/Simula-CommonBaseLanguage.pdf 

IBM System 360/370 and Historical Documentation. www.edelweb.fr. 20065182017916

E. W. Dijkstra; C. A. R. Hoare; Ole-Johan Dahl (1972). Structured Programming. Academic Press, London. ISBN 0-12-200550-3 
E. W. C. A. R. O.-J.    1975 

  : 1993 

[]






ALGOL


[]


INTRODUCTION TO OOP IN SIMULA

Cim

Cim  Simula to C translator. Mother of all OO-languages  Cim 
Cim 3.33 for MS Windows   Windows 

Simula  Guide: History, Origin, and More