SlideShare a Scribd company logo
The ALGOL Family

CSE341
Programming Languages
Overview
   Historical perspective
   ALGOL Goals
   BNF (Backus-Naur Form)
   ALGOL 58
   ALGOL 60
   ALGOL 68
   Success and Failure of ALGOL
   Conclusion
History
   ALGOrithmic Language
   Developed in Europe by an international group,
    consisting of 7 different countries, in the late 1950’s
   Very similar to FORTRAN
   Peter Naur and J.W. Backus worked on the project.
    Was the debut of the BNF syntax.
   Designed specifically for programming scientific
    computations
History (Continued)
   Never became as commercially popular as FORTRAN
    or COBOL
       Was not compatible with IBM

   Is considered the most important programming language
    in terms of influence on later language development
   Many similar languages can (and are) referred to as
    “ALGOL-like”
       JAVA, C, C++, Pascal, Ada, FORTRAN, etc.
ALGOL Goals
   To be as close as possible to standard math notation
      Also very readable without much more explanation


   Should be possible to use it to describe algorithms in publications
      A form of it is still used today


   Should be mechanically translatable into machine language
    programs
BNF (Backus-Naur Form)
   Was first to use BNF (Backus-Naur Form)
      Same Backus that created Fortran
          He also was one of the main creators of Algol
          And he created functional programming
          And won the Turing award in ’77
      Right. Back to BNF
      BNF example:
          <value> := <number> | <variable> | <expression>
          <number> := <integer> | <float>
          <integer> := <integer><digit> | <digit>
          <digit> := 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
   Language was designed by committee
   Report is a “paradigm of brevity and clarity”
      Most languages today require 1000’s of pages
      Brevity and clarity contributed to reputation as simple, elegant language
Three Language Versions
   Reference language
      Used by the committee, described in the report, and used in
       official Algol publications
   Publication language
      Allowed for differences in the character set for different
       languages
      Europeans and Americans couldn’t decide on which character to
       use for the decimal point!
   Hardware representations
      Condensed languages for machine input
ALGOL 58
The beginning
   June 1957 – ACM requested a committee to
    look into a universal programming language
   European and American groups got together in
    Zurich.
     No  current language covers everything
     Creating more non-ideal languages doesn’t help the
      situation
     Each passing month more people start using other
      languages
     How can the logical structure of existing languages be
      adjusted
ALGOL 58
New Features
   Types
     Integer
     Real
     Boolean
   Formal vs Actual parameters
   Declaration
   for statements
   Switch
   Compound statements
   Begin end delimiters
   Three level language description
   Call by name
ALGOL 58
Function vs Procedure
   Nature of the body
      Expression
      Compound statement
   Parameter evaluation mechanism
      Value of any actual parameter
      Text of any actual parameter
   Identifier collision
      Non-parameter identifiers are global to the definition
      Communication only through parameters
   Place of use
      An operand in an expression
      A statement or an operand in an expression
Call by name vs. by value
   Call by name is default
   Call by name: re-evaluate the actual parameter on every
    use
      For actual parameters that are simple variables, it’s
       the same as call by reference
      For actual parameters that are expressions, the
       expression is re-evaluated on each access
   No other language ever used call by name…
Call by name
begin
  integer n;
  procedure p (k: integer)   parameter is n+10 (not just 10)
     begin
       print (k);            prints n+10, which is 10
       n := n+1;             n is still 0; thus, n becomes 1
       print (k);            prints n+10, which is 11
     end;
                             n is set to 0
  n := 0;                    parameter is n+10 (not just 10)
  p (n+10);
end;
Example
   Computing Illustrate ( Compute The Mean ):
    // the main program (this is a comment)
    begin
            integer N;
            Read Int(N);

          begin
                     real array Data[1:N];
                     real sum, avg;
                     integer i; sum:=0;
                     for i:=1 step 1 until N do
                                 begin real val;
                                 Read Real(val);
                                 Data[i]:=if val<0 then -val else val
                     end;

                     for i:=1 step 1 until N do
                                 sum:=sum + Data[i];
                     avg:=sum/N;
                     Print Real(avg)
          end
    end
Example(Continued)
   I/O Illustrate: because ALGOL had no IO facilities. The following
    code could run on an ALGOL implementation for a Burroughs A-
    Series mainframe.

    BEGIN
    FILE F (KIND=REMOTE);
    EBCDIC ARRAY E [0:11];
    REPLACE E BY "HELLO WORLD!";
    WHILE TRUE DO
         BEGIN
         WRITE (F, *, E);
         END;
    END.
Problems with Algol58

   Didn’t include a I/O library
     Thus, each implementation had a different
      means for I/O
     This caused compatibility problems
     And no standard way to write a Hello World
      program
ALGOL 60
   Basic Language of 1960
     Simple imperative language + functions
     Successful syntax, BNF -- used by many successors
           statement oriented
           begin … end blocks (like C { … } )
           if … then … else
    Recursive functions and stack storage allocation
    Type discipline was improved by later languages
    Very influential but not widely used in US
 Tony Hoare: “Here is a language so far ahead of its time
  that it was not only an improvement on its predecessors but
  also on nearly all of its successors.”
ALGOL 60
Proposed Changes
   The empty statement was adopted
   Modifications to operation hierarchy
      Unary operators having higher precedence than binary operators was adopted
      Implied multiplication was rejected
      Relation sequences were rejected
   The else clause was adopted
   Strings, lists, trees, matrices, and complex numbers were rejected as types
   Multiple assignment statements were adopted
        Created a new problem, A[i] := i := e
   Recursion became possible in obvious ways
   Constants were rejected
ALGOL 60
What’s New
   Block
   Call by value/name
   Typed procedures
   Declaration scope
   Dynamic arrays
   Side effects
   Global and local variables
   Step, until, while, if then else
   Activation records
   Recursive decent parsers
   No I/O
Algol 60 Sample

real procedure average(A,n);
  real array A; integer n;                       no array bounds
  begin
       real sum; sum := 0;
       for i = 1 step 1 until n do
               sum := sum + A[i];
       average := sum/n                           no ; here
  end;
                    set procedure return value by assignment
Algol Oddity
   Question:
      Is x := x equivalent to doing nothing?
   Interesting answer in Algol
       integer procedure p;
       begin
                ….
                p := p
              ….
         end;
      Assignment here is actually a recursive call
Problems with Algol60
   Holes in type discipline
      Parameter types can be arrays, but
          No array bounds

      Parameter types can be procedures, but
          No argument or return types for procedure parameters

   Problems with parameter passing mechanisms
      Pass-by-name “Copy rule” duplicates code,         interacting
       badly with side effects
      Pass-by-value expensive for arrays
   Some awkward control issues
      goto out of block requires memory management
ALGOL 68
   Considered difficult to understand
       Idiosyncratic terminology
            Types were called “modes”
            Arrays were called “multiple values”
       Used vW grammars instead of BNF
            Context-sensitive grammar invented by van Wijngaarden
     Elaborate type system
     Complicated type conversions

   Fixed some problems of Algol 60
       Eliminated pass-by-name
   Not widely adopted
ALGOL 68
What’s New modes
Many new types, called
        Primatives
             Bits
             Bytes
             String
             Sema (a semaphore)
             Complex
             File
             Pipe
             Channel
             format
        Additional
             Flex (Flexible array)
             Heap (space on the heap)
             Loc (local space on the stack)
             Ref (pointer)
             Long (bigger ints/reals)
             Short (smaller ints/reals)

   Declaration of custom types/modes
Algol 68 Modes
Primitive modes      Compound
   Modes
 int                --arrays
 Real               --structures
 Char               --procedures
 bool               --sets
 string              --pointers
 Compl(complex)
 bits
 bytes
                      Rich, structured, and orthogonal
                      type system is a major contribution
 Sema (semaphore)
                      of Algol 68.
 Format (I/O)
 file
Other Features of Algol 68
   Storage management
      Local storage on stack
      Heap storage and garbage collection
   Parameter passing
      Pass-by-value
      Use pointer types to obtain pass-by-reference
   Assignable procedure variables
Structure
   ALGOL68 is block structured w/ static scope rules
   ALGOL68's model of computation:
       static
       stack: block/procedure AR's; local data objects
       heap: “heap” -- dynamic-- data objects
   ALGOL68 is an expression-oriented language
Basic Syntax
   Addition : “ + ”
   Subtraction : “ - ”
   Multiplication : “ * ”
   Division : “ / ”
   Exponentiation : “ ** ”
   Assignment : “ := ”
   Boolean Expressions
      = , > , < , <= , >= , /=
Recursion
   Algol 68 Supports recursion
    Example:
        real procedure factorial (n);
        begin
           if n = 1 then
                 factorial := 1;
                    else
               factorial := n* factorial(n-1);
        end;
Arrays
   Three types of arrays: real, integer, Boolean
   Each array must contain all the same types
   All arrays are of type real unless specified
   Can have multidimensional arrays
   Declarations:

     array name1[1:100];             (1D array of type real)
     real array name2(-3:6,20:40);   (2D array of type real)
     integer array name3,name4(1:46);(2 1D arrays of type integer)
     Boolean array name5(-10:n);     (1D array of type Boolean)
                                      (Allocated Dynamically)
Block Structure
   First language to implement a block structure
   Similar in form to pascal
    begin
      …..
    end;
   Each block can have its own variables, visible only to
    that block (local variables). After the block is exited the
    values of all the local variables are lost.
Block Structure example
   Example:
    begin
      own integer i; integer j,k;
      i := j + k;
    end;
        The integer i will have the value of j+k stored the next time
         the block is entered
   By using the “own” statement the variable will retain its
    value for the next time the block is entered
Parameter Passing
   Two types of parameter passing: by Value, by Name

   Pass by Value works the same as in most other languages

   Pass by Name is similar to pass by reference, but it adds flexibility

       All parameters are pass by name unless otherwise specified
      Example: can make a call “sum(i,2,5,x+6)” to the procedure sum
        procedure sum(i,j,k,l); value i,j,k;
        begin
           i := i + j + k + l
        end;
     (will execute as i := i + 2 + 5 + (x+6))
ALGOL
Successes and Failures
   Programming computers – Partial Success
       Core language is strong, no I/O is a serious shortcoming
   Publication of algorithms – Very Successful
   Stimulus to compiler design – Success with a seed of
    corruption
       It only stimulated compiler design because it was difficult
   Stimulated formal language research – Success
       Not the goal of the ALGOL effort
   Description of ALGOL 60 – Failure
     Difficult to understand for the uninitiated reader
     Needs an informal explanation
Conclusion
   General purpose algorithmic language with a clean
    consistent and unambiguous syntax.
   Comprehensive fully-checked type-system covering
    structures, unions, pointers, arrays and procedures.
   Procedures may be nested inside procedures and can
    deliver values of any type without you having to worry
    about where the storage is coming from.
   User-defined operators including user-defined operator
    symbols.
   Powerful control structures can deliver values of any
    type.
Conclusion (Continued)
   Dynamic sized arrays know their current bounds.
   Array and structure displays can be used in any context.
   Parallel programming with semaphores.
   Complex arithmetic.
   Declarations can be interleaved with statements.
   Clear distinction between value semantics and reference
    semantics.
   No distinction between compile-time constants and run-
    time values.
References
   Lindsey, C.H., “A History of ALGOL 68.” History of Programming
    Languages, ACM Press. 1993. 97-132
   Naur, Peter, “Successes and failures of the ALGOL effort”, ALGOL
    Bulletin #28, Computer History Museum. 1986. 58-62
   Thomson, C.M., “Algol 68 as a Living Language”, ALGOL Bulletin
    #47, Computer History Museum. 1981. 21-24
   Perlis, Alan, “The American side of the development of Algol”, The
    first ACM SIGPLAN conference on History of programming
    languages, ACM Press. 1978. 3-14
   Naur, Peter. “The European side of the last phase of the
    development of ALGOL 60”, The first ACM SIGPLAN conference on
    History of programming languages, ACM Press. 1978. 15-44

More Related Content

What's hot

Clases y objetos en java
Clases y objetos en javaClases y objetos en java
Clases y objetos en java
Carlos Van de Velde
 
Recursive Descent Parsing
Recursive Descent Parsing  Recursive Descent Parsing
Recursive Descent Parsing
Md Tajul Islam
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
Balwant Gorad
 
Directed Acyclic Graph Representation of basic blocks
Directed Acyclic Graph Representation of basic blocksDirected Acyclic Graph Representation of basic blocks
Directed Acyclic Graph Representation of basic blocks
Mohammad Vaseem Akaram
 
Pascal Programming Language
Pascal Programming LanguagePascal Programming Language
Pascal Programming Language
Reham AlBlehid
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
Naz Abdalla
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
Nochiketa Chakraborty
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLE
DrkhanchanaR
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
Nilesh Dalvi
 
Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)
Shivang Bajaniya
 
Data structures vb
Data structures vbData structures vb
Data structures vb
nicky_walters
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
koolkampus
 
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IAlgorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms I
Mohamed Loey
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
Sandeep Kumar Singh
 
Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
Kuppusamy P
 
Oop Presentation
Oop PresentationOop Presentation
Oop Presentation
Ghaffar Khan
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
Elizabeth Thomas
 
Data Structures Chapter-4
Data Structures Chapter-4Data Structures Chapter-4
Data Structures Chapter-4
priyavanimurugarajan
 
Introduction to Programming in LISP
Introduction to Programming in LISPIntroduction to Programming in LISP
Introduction to Programming in LISP
Knoldus Inc.
 
Unit 2 oracle9i
Unit 2  oracle9i Unit 2  oracle9i
Unit 2 oracle9i
DrkhanchanaR
 

What's hot (20)

Clases y objetos en java
Clases y objetos en javaClases y objetos en java
Clases y objetos en java
 
Recursive Descent Parsing
Recursive Descent Parsing  Recursive Descent Parsing
Recursive Descent Parsing
 
Searching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data StructureSearching and Sorting Techniques in Data Structure
Searching and Sorting Techniques in Data Structure
 
Directed Acyclic Graph Representation of basic blocks
Directed Acyclic Graph Representation of basic blocksDirected Acyclic Graph Representation of basic blocks
Directed Acyclic Graph Representation of basic blocks
 
Pascal Programming Language
Pascal Programming LanguagePascal Programming Language
Pascal Programming Language
 
Arrays in Java
Arrays in JavaArrays in Java
Arrays in Java
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
Unit I Database concepts - RDBMS & ORACLE
Unit I  Database concepts - RDBMS & ORACLEUnit I  Database concepts - RDBMS & ORACLE
Unit I Database concepts - RDBMS & ORACLE
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
 
Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)Transpilers(Source-to-Source Compilers)
Transpilers(Source-to-Source Compilers)
 
Data structures vb
Data structures vbData structures vb
Data structures vb
 
Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9Formal Specification in Software Engineering SE9
Formal Specification in Software Engineering SE9
 
Algorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms IAlgorithms Lecture 4: Sorting Algorithms I
Algorithms Lecture 4: Sorting Algorithms I
 
Object oriented programming
Object oriented programmingObject oriented programming
Object oriented programming
 
Symbol table in compiler Design
Symbol table in compiler DesignSymbol table in compiler Design
Symbol table in compiler Design
 
Oop Presentation
Oop PresentationOop Presentation
Oop Presentation
 
Basics of JAVA programming
Basics of JAVA programmingBasics of JAVA programming
Basics of JAVA programming
 
Data Structures Chapter-4
Data Structures Chapter-4Data Structures Chapter-4
Data Structures Chapter-4
 
Introduction to Programming in LISP
Introduction to Programming in LISPIntroduction to Programming in LISP
Introduction to Programming in LISP
 
Unit 2 oracle9i
Unit 2  oracle9i Unit 2  oracle9i
Unit 2 oracle9i
 

Similar to ALGOL ailesi programlama dilleri

Evaluation and analysis of ALGOL, PASCAL and ADA
Evaluation and analysis of ALGOL, PASCAL and ADAEvaluation and analysis of ALGOL, PASCAL and ADA
Evaluation and analysis of ALGOL, PASCAL and ADA
Dilanka Dias
 
Maclennan chap5-pascal
Maclennan chap5-pascalMaclennan chap5-pascal
Maclennan chap5-pascal
Serghei Urban
 
Unit -1 CAP.pptx
Unit -1 CAP.pptxUnit -1 CAP.pptx
Unit -1 CAP.pptx
malekaanjum1
 
presentation_intro_to_python
presentation_intro_to_pythonpresentation_intro_to_python
presentation_intro_to_python
gunanandJha2
 
presentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.pptpresentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.ppt
MohitChaudhary637683
 
ParaSail
ParaSail  ParaSail
ParaSail
AdaCore
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
samiwaris2
 
3.5
3.53.5
Theperlreview
TheperlreviewTheperlreview
Theperlreview
Casiano Rodriguez-leon
 
PARADIGM IT.pptx
PARADIGM IT.pptxPARADIGM IT.pptx
PARADIGM IT.pptx
jamesmarken1
 
Introduction to F#
Introduction to F#Introduction to F#
Introduction to F#
Talbott Crowell
 
F# 101
F# 101F# 101
F# 101
Chris Alcock
 
Erlang, an overview
Erlang, an overviewErlang, an overview
Erlang, an overview
Patrick Huesler
 
Pascal programming language
Pascal programming languagePascal programming language
Pascal programming language
Verónica Meo Laos
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementation
Bilal Maqbool ツ
 
Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Win
l xf
 
Esoft Metro Campus - Programming with C++
Esoft Metro Campus - Programming with C++Esoft Metro Campus - Programming with C++
Esoft Metro Campus - Programming with C++
Rasan Samarasinghe
 
python and perl
python and perlpython and perl
python and perl
Mara Angelica Refraccion
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
Sangharsh agarwal
 
Go Programming language, golang
Go Programming language, golangGo Programming language, golang
Go Programming language, golang
Basil N G
 

Similar to ALGOL ailesi programlama dilleri (20)

Evaluation and analysis of ALGOL, PASCAL and ADA
Evaluation and analysis of ALGOL, PASCAL and ADAEvaluation and analysis of ALGOL, PASCAL and ADA
Evaluation and analysis of ALGOL, PASCAL and ADA
 
Maclennan chap5-pascal
Maclennan chap5-pascalMaclennan chap5-pascal
Maclennan chap5-pascal
 
Unit -1 CAP.pptx
Unit -1 CAP.pptxUnit -1 CAP.pptx
Unit -1 CAP.pptx
 
presentation_intro_to_python
presentation_intro_to_pythonpresentation_intro_to_python
presentation_intro_to_python
 
presentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.pptpresentation_intro_to_python_1462930390_181219.ppt
presentation_intro_to_python_1462930390_181219.ppt
 
ParaSail
ParaSail  ParaSail
ParaSail
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdf
 
3.5
3.53.5
3.5
 
Theperlreview
TheperlreviewTheperlreview
Theperlreview
 
PARADIGM IT.pptx
PARADIGM IT.pptxPARADIGM IT.pptx
PARADIGM IT.pptx
 
Introduction to F#
Introduction to F#Introduction to F#
Introduction to F#
 
F# 101
F# 101F# 101
F# 101
 
Erlang, an overview
Erlang, an overviewErlang, an overview
Erlang, an overview
 
Pascal programming language
Pascal programming languagePascal programming language
Pascal programming language
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementation
 
Erlang Message Passing Concurrency, For The Win
Erlang  Message  Passing  Concurrency,  For  The  WinErlang  Message  Passing  Concurrency,  For  The  Win
Erlang Message Passing Concurrency, For The Win
 
Esoft Metro Campus - Programming with C++
Esoft Metro Campus - Programming with C++Esoft Metro Campus - Programming with C++
Esoft Metro Campus - Programming with C++
 
python and perl
python and perlpython and perl
python and perl
 
Introduction Of C++
Introduction Of C++Introduction Of C++
Introduction Of C++
 
Go Programming language, golang
Go Programming language, golangGo Programming language, golang
Go Programming language, golang
 

More from Cumhuriyet Üniversitesi

Gereksinim Analizi Dokümanı Hazırlama
Gereksinim Analizi Dokümanı HazırlamaGereksinim Analizi Dokümanı Hazırlama
Gereksinim Analizi Dokümanı Hazırlama
Cumhuriyet Üniversitesi
 
Pascal
Pascal Pascal
Prolog
PrologProlog
Teknik Rapor Nasıl Yazılır?
Teknik Rapor Nasıl Yazılır?Teknik Rapor Nasıl Yazılır?
Teknik Rapor Nasıl Yazılır?
Cumhuriyet Üniversitesi
 
Veri madenciliği ve ids
Veri madenciliği ve idsVeri madenciliği ve ids
Veri madenciliği ve ids
Cumhuriyet Üniversitesi
 
Delphi 7
Delphi 7Delphi 7

More from Cumhuriyet Üniversitesi (8)

Gereksinim Analizi Dokümanı Hazırlama
Gereksinim Analizi Dokümanı HazırlamaGereksinim Analizi Dokümanı Hazırlama
Gereksinim Analizi Dokümanı Hazırlama
 
Pascal
Pascal Pascal
Pascal
 
Phyton Programlama Dili
Phyton Programlama DiliPhyton Programlama Dili
Phyton Programlama Dili
 
Prolog
PrologProlog
Prolog
 
Teknik Rapor Nasıl Yazılır?
Teknik Rapor Nasıl Yazılır?Teknik Rapor Nasıl Yazılır?
Teknik Rapor Nasıl Yazılır?
 
Veri madenciliği ve ids
Veri madenciliği ve idsVeri madenciliği ve ids
Veri madenciliği ve ids
 
Veritabanları
VeritabanlarıVeritabanları
Veritabanları
 
Delphi 7
Delphi 7Delphi 7
Delphi 7
 

Recently uploaded

"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
Fwdays
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
Fwdays
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
Fwdays
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
Ivo Velitchkov
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
Fwdays
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
Ajin Abraham
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
Pablo Gómez Abajo
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
Javier Junquera
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
saastr
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
Edge AI and Vision Alliance
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 

Recently uploaded (20)

"Scaling RAG Applications to serve millions of users", Kevin Goedecke
"Scaling RAG Applications to serve millions of users",  Kevin Goedecke"Scaling RAG Applications to serve millions of users",  Kevin Goedecke
"Scaling RAG Applications to serve millions of users", Kevin Goedecke
 
"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota"Choosing proper type of scaling", Olena Syrota
"Choosing proper type of scaling", Olena Syrota
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk"Frontline Battles with DDoS: Best practices and Lessons Learned",  Igor Ivaniuk
"Frontline Battles with DDoS: Best practices and Lessons Learned", Igor Ivaniuk
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Apps Break Data
Apps Break DataApps Break Data
Apps Break Data
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin..."$10 thousand per minute of downtime: architecture, queues, streaming and fin...
"$10 thousand per minute of downtime: architecture, queues, streaming and fin...
 
AppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSFAppSec PNW: Android and iOS Application Security with MobSF
AppSec PNW: Android and iOS Application Security with MobSF
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
Mutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented ChatbotsMutation Testing for Task-Oriented Chatbots
Mutation Testing for Task-Oriented Chatbots
 
GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)GNSS spoofing via SDR (Criptored Talks 2024)
GNSS spoofing via SDR (Criptored Talks 2024)
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
9 CEO's who hit $100m ARR Share Their Top Growth Tactics Nathan Latka, Founde...
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
“Temporal Event Neural Networks: A More Efficient Alternative to the Transfor...
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 

ALGOL ailesi programlama dilleri

  • 2. Overview  Historical perspective  ALGOL Goals  BNF (Backus-Naur Form)  ALGOL 58  ALGOL 60  ALGOL 68  Success and Failure of ALGOL  Conclusion
  • 3. History  ALGOrithmic Language  Developed in Europe by an international group, consisting of 7 different countries, in the late 1950’s  Very similar to FORTRAN  Peter Naur and J.W. Backus worked on the project. Was the debut of the BNF syntax.  Designed specifically for programming scientific computations
  • 4. History (Continued)  Never became as commercially popular as FORTRAN or COBOL  Was not compatible with IBM  Is considered the most important programming language in terms of influence on later language development  Many similar languages can (and are) referred to as “ALGOL-like”  JAVA, C, C++, Pascal, Ada, FORTRAN, etc.
  • 5. ALGOL Goals  To be as close as possible to standard math notation  Also very readable without much more explanation  Should be possible to use it to describe algorithms in publications  A form of it is still used today  Should be mechanically translatable into machine language programs
  • 6. BNF (Backus-Naur Form)  Was first to use BNF (Backus-Naur Form)  Same Backus that created Fortran  He also was one of the main creators of Algol  And he created functional programming  And won the Turing award in ’77  Right. Back to BNF  BNF example:  <value> := <number> | <variable> | <expression>  <number> := <integer> | <float>  <integer> := <integer><digit> | <digit>  <digit> := 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Language was designed by committee  Report is a “paradigm of brevity and clarity”  Most languages today require 1000’s of pages  Brevity and clarity contributed to reputation as simple, elegant language
  • 7. Three Language Versions  Reference language  Used by the committee, described in the report, and used in official Algol publications  Publication language  Allowed for differences in the character set for different languages  Europeans and Americans couldn’t decide on which character to use for the decimal point!  Hardware representations  Condensed languages for machine input
  • 8. ALGOL 58 The beginning  June 1957 – ACM requested a committee to look into a universal programming language  European and American groups got together in Zurich.  No current language covers everything  Creating more non-ideal languages doesn’t help the situation  Each passing month more people start using other languages  How can the logical structure of existing languages be adjusted
  • 9. ALGOL 58 New Features  Types  Integer  Real  Boolean  Formal vs Actual parameters  Declaration  for statements  Switch  Compound statements  Begin end delimiters  Three level language description  Call by name
  • 10. ALGOL 58 Function vs Procedure  Nature of the body  Expression  Compound statement  Parameter evaluation mechanism  Value of any actual parameter  Text of any actual parameter  Identifier collision  Non-parameter identifiers are global to the definition  Communication only through parameters  Place of use  An operand in an expression  A statement or an operand in an expression
  • 11. Call by name vs. by value  Call by name is default  Call by name: re-evaluate the actual parameter on every use  For actual parameters that are simple variables, it’s the same as call by reference  For actual parameters that are expressions, the expression is re-evaluated on each access  No other language ever used call by name…
  • 12. Call by name begin integer n; procedure p (k: integer) parameter is n+10 (not just 10) begin print (k); prints n+10, which is 10 n := n+1; n is still 0; thus, n becomes 1 print (k); prints n+10, which is 11 end; n is set to 0 n := 0; parameter is n+10 (not just 10) p (n+10); end;
  • 13. Example  Computing Illustrate ( Compute The Mean ): // the main program (this is a comment) begin integer N; Read Int(N); begin real array Data[1:N]; real sum, avg; integer i; sum:=0; for i:=1 step 1 until N do begin real val; Read Real(val); Data[i]:=if val<0 then -val else val end; for i:=1 step 1 until N do sum:=sum + Data[i]; avg:=sum/N; Print Real(avg) end end
  • 14. Example(Continued)  I/O Illustrate: because ALGOL had no IO facilities. The following code could run on an ALGOL implementation for a Burroughs A- Series mainframe. BEGIN FILE F (KIND=REMOTE); EBCDIC ARRAY E [0:11]; REPLACE E BY "HELLO WORLD!"; WHILE TRUE DO BEGIN WRITE (F, *, E); END; END.
  • 15. Problems with Algol58  Didn’t include a I/O library  Thus, each implementation had a different means for I/O  This caused compatibility problems  And no standard way to write a Hello World program
  • 16. ALGOL 60  Basic Language of 1960  Simple imperative language + functions  Successful syntax, BNF -- used by many successors  statement oriented  begin … end blocks (like C { … } )  if … then … else Recursive functions and stack storage allocation  Type discipline was improved by later languages  Very influential but not widely used in US  Tony Hoare: “Here is a language so far ahead of its time that it was not only an improvement on its predecessors but also on nearly all of its successors.”
  • 17. ALGOL 60 Proposed Changes  The empty statement was adopted  Modifications to operation hierarchy  Unary operators having higher precedence than binary operators was adopted  Implied multiplication was rejected  Relation sequences were rejected  The else clause was adopted  Strings, lists, trees, matrices, and complex numbers were rejected as types  Multiple assignment statements were adopted  Created a new problem, A[i] := i := e  Recursion became possible in obvious ways  Constants were rejected
  • 18. ALGOL 60 What’s New  Block  Call by value/name  Typed procedures  Declaration scope  Dynamic arrays  Side effects  Global and local variables  Step, until, while, if then else  Activation records  Recursive decent parsers  No I/O
  • 19. Algol 60 Sample real procedure average(A,n); real array A; integer n; no array bounds begin real sum; sum := 0; for i = 1 step 1 until n do sum := sum + A[i]; average := sum/n no ; here end; set procedure return value by assignment
  • 20. Algol Oddity  Question:  Is x := x equivalent to doing nothing?  Interesting answer in Algol integer procedure p; begin …. p := p …. end;  Assignment here is actually a recursive call
  • 21. Problems with Algol60  Holes in type discipline  Parameter types can be arrays, but  No array bounds  Parameter types can be procedures, but  No argument or return types for procedure parameters  Problems with parameter passing mechanisms  Pass-by-name “Copy rule” duplicates code, interacting badly with side effects  Pass-by-value expensive for arrays  Some awkward control issues  goto out of block requires memory management
  • 22. ALGOL 68  Considered difficult to understand  Idiosyncratic terminology  Types were called “modes”  Arrays were called “multiple values”  Used vW grammars instead of BNF  Context-sensitive grammar invented by van Wijngaarden  Elaborate type system  Complicated type conversions  Fixed some problems of Algol 60  Eliminated pass-by-name  Not widely adopted
  • 23. ALGOL 68 What’s New modes Many new types, called  Primatives  Bits  Bytes  String  Sema (a semaphore)  Complex  File  Pipe  Channel  format  Additional  Flex (Flexible array)  Heap (space on the heap)  Loc (local space on the stack)  Ref (pointer)  Long (bigger ints/reals)  Short (smaller ints/reals)  Declaration of custom types/modes
  • 24. Algol 68 Modes Primitive modes Compound Modes  int --arrays  Real --structures  Char --procedures  bool --sets  string --pointers  Compl(complex)  bits  bytes Rich, structured, and orthogonal type system is a major contribution  Sema (semaphore) of Algol 68.  Format (I/O)  file
  • 25. Other Features of Algol 68  Storage management  Local storage on stack  Heap storage and garbage collection  Parameter passing  Pass-by-value  Use pointer types to obtain pass-by-reference  Assignable procedure variables
  • 26. Structure  ALGOL68 is block structured w/ static scope rules  ALGOL68's model of computation:  static  stack: block/procedure AR's; local data objects  heap: “heap” -- dynamic-- data objects  ALGOL68 is an expression-oriented language
  • 27. Basic Syntax  Addition : “ + ”  Subtraction : “ - ”  Multiplication : “ * ”  Division : “ / ”  Exponentiation : “ ** ”  Assignment : “ := ”  Boolean Expressions  = , > , < , <= , >= , /=
  • 28. Recursion  Algol 68 Supports recursion Example: real procedure factorial (n); begin if n = 1 then factorial := 1; else factorial := n* factorial(n-1); end;
  • 29. Arrays  Three types of arrays: real, integer, Boolean  Each array must contain all the same types  All arrays are of type real unless specified  Can have multidimensional arrays  Declarations:  array name1[1:100]; (1D array of type real)  real array name2(-3:6,20:40); (2D array of type real)  integer array name3,name4(1:46);(2 1D arrays of type integer)  Boolean array name5(-10:n); (1D array of type Boolean) (Allocated Dynamically)
  • 30. Block Structure  First language to implement a block structure  Similar in form to pascal begin ….. end;  Each block can have its own variables, visible only to that block (local variables). After the block is exited the values of all the local variables are lost.
  • 31. Block Structure example  Example: begin own integer i; integer j,k; i := j + k; end;  The integer i will have the value of j+k stored the next time the block is entered  By using the “own” statement the variable will retain its value for the next time the block is entered
  • 32. Parameter Passing  Two types of parameter passing: by Value, by Name  Pass by Value works the same as in most other languages  Pass by Name is similar to pass by reference, but it adds flexibility  All parameters are pass by name unless otherwise specified  Example: can make a call “sum(i,2,5,x+6)” to the procedure sum procedure sum(i,j,k,l); value i,j,k; begin i := i + j + k + l end; (will execute as i := i + 2 + 5 + (x+6))
  • 33. ALGOL Successes and Failures  Programming computers – Partial Success  Core language is strong, no I/O is a serious shortcoming  Publication of algorithms – Very Successful  Stimulus to compiler design – Success with a seed of corruption  It only stimulated compiler design because it was difficult  Stimulated formal language research – Success  Not the goal of the ALGOL effort  Description of ALGOL 60 – Failure  Difficult to understand for the uninitiated reader  Needs an informal explanation
  • 34. Conclusion  General purpose algorithmic language with a clean consistent and unambiguous syntax.  Comprehensive fully-checked type-system covering structures, unions, pointers, arrays and procedures.  Procedures may be nested inside procedures and can deliver values of any type without you having to worry about where the storage is coming from.  User-defined operators including user-defined operator symbols.  Powerful control structures can deliver values of any type.
  • 35. Conclusion (Continued)  Dynamic sized arrays know their current bounds.  Array and structure displays can be used in any context.  Parallel programming with semaphores.  Complex arithmetic.  Declarations can be interleaved with statements.  Clear distinction between value semantics and reference semantics.  No distinction between compile-time constants and run- time values.
  • 36. References  Lindsey, C.H., “A History of ALGOL 68.” History of Programming Languages, ACM Press. 1993. 97-132  Naur, Peter, “Successes and failures of the ALGOL effort”, ALGOL Bulletin #28, Computer History Museum. 1986. 58-62  Thomson, C.M., “Algol 68 as a Living Language”, ALGOL Bulletin #47, Computer History Museum. 1981. 21-24  Perlis, Alan, “The American side of the development of Algol”, The first ACM SIGPLAN conference on History of programming languages, ACM Press. 1978. 3-14  Naur, Peter. “The European side of the last phase of the development of ALGOL 60”, The first ACM SIGPLAN conference on History of programming languages, ACM Press. 1978. 15-44