SlideShare una empresa de Scribd logo
1 de 36
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

Más contenido relacionado

La actualidad más candente

INTRODUCTION TO LISP
INTRODUCTION TO LISPINTRODUCTION TO LISP
INTRODUCTION TO LISPNilt1234
 
Algorithm analysis and efficiency
Algorithm analysis and efficiencyAlgorithm analysis and efficiency
Algorithm analysis and efficiencyppts123456
 
Functions in c language
Functions in c language Functions in c language
Functions in c language tanmaymodi4
 
OOP Lecture 20-MultiThreading.pptx
OOP Lecture 20-MultiThreading.pptxOOP Lecture 20-MultiThreading.pptx
OOP Lecture 20-MultiThreading.pptxTanzila Kehkashan
 
Functions in python
Functions in pythonFunctions in python
Functions in pythoncolorsof
 
Python decorators
Python decoratorsPython decorators
Python decoratorsAlex Su
 
Chapter Introduction to Modular Programming.ppt
Chapter Introduction to Modular Programming.pptChapter Introduction to Modular Programming.ppt
Chapter Introduction to Modular Programming.pptAmanuelZewdie4
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in JavaSpotle.ai
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingMoutaz Haddara
 
08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.pptTareq Hasan
 
Basic of the C language
Basic of the C languageBasic of the C language
Basic of the C languageSachin Verma
 
Iterarators and generators in python
Iterarators and generators in pythonIterarators and generators in python
Iterarators and generators in pythonSarfaraz Ghanta
 

La actualidad más candente (20)

Function in C
Function in CFunction in C
Function in C
 
INTRODUCTION TO LISP
INTRODUCTION TO LISPINTRODUCTION TO LISP
INTRODUCTION TO LISP
 
Algorithm analysis and efficiency
Algorithm analysis and efficiencyAlgorithm analysis and efficiency
Algorithm analysis and efficiency
 
C# Loops
C# LoopsC# Loops
C# Loops
 
Functions in c language
Functions in c language Functions in c language
Functions in c language
 
OOP Lecture 20-MultiThreading.pptx
OOP Lecture 20-MultiThreading.pptxOOP Lecture 20-MultiThreading.pptx
OOP Lecture 20-MultiThreading.pptx
 
C functions
C functionsC functions
C functions
 
Functions in python
Functions in pythonFunctions in python
Functions in python
 
Function overloading
Function overloadingFunction overloading
Function overloading
 
Python decorators
Python decoratorsPython decorators
Python decorators
 
Chapter Introduction to Modular Programming.ppt
Chapter Introduction to Modular Programming.pptChapter Introduction to Modular Programming.ppt
Chapter Introduction to Modular Programming.ppt
 
Python tuple
Python   tuplePython   tuple
Python tuple
 
Class and Objects in Java
Class and Objects in JavaClass and Objects in Java
Class and Objects in Java
 
Constructor ppt
Constructor pptConstructor ppt
Constructor ppt
 
Introduction to Object Oriented Programming
Introduction to Object Oriented ProgrammingIntroduction to Object Oriented Programming
Introduction to Object Oriented Programming
 
08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt08 c++ Operator Overloading.ppt
08 c++ Operator Overloading.ppt
 
08 subprograms
08 subprograms08 subprograms
08 subprograms
 
Control statement-Selective
Control statement-SelectiveControl statement-Selective
Control statement-Selective
 
Basic of the C language
Basic of the C languageBasic of the C language
Basic of the C language
 
Iterarators and generators in python
Iterarators and generators in pythonIterarators and generators in python
Iterarators and generators in python
 

Similar a 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 ADADilanka Dias
 
Maclennan chap5-pascal
Maclennan chap5-pascalMaclennan chap5-pascal
Maclennan chap5-pascalSerghei Urban
 
presentation_intro_to_python
presentation_intro_to_pythonpresentation_intro_to_python
presentation_intro_to_pythongunanandJha2
 
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.pptMohitChaudhary637683
 
ParaSail
ParaSail  ParaSail
ParaSail AdaCore
 
Python (3).pdf
Python (3).pdfPython (3).pdf
Python (3).pdfsamiwaris2
 
Programing paradigm &amp; implementation
Programing paradigm &amp; implementationPrograming paradigm &amp; implementation
Programing paradigm &amp; implementationBilal 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 Winl 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
 
Go Programming language, golang
Go Programming language, golangGo Programming language, golang
Go Programming language, golangBasil N G
 

Similar a 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
 

Más de 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
 

Último

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Último (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

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