UT Dallas CS 4337 - #Sebesta ch02 rev1 to use (46 pages)

Previewing pages 1, 2, 3, 22, 23, 24, 44, 45, 46 of 46 page document View the full content.
View Full Document

#Sebesta ch02 rev1 to use



Previewing pages 1, 2, 3, 22, 23, 24, 44, 45, 46 of actual document.

View the full content.
View Full Document
View Full Document

#Sebesta ch02 rev1 to use

29 views


Pages:
46
School:
University of Texas at Dallas
Course:
Cs 4337 - Organization of Programming Languages
Unformatted text preview:

Chapter 2 Evolution of the Major Programming Languages Genealogy of Common Languages Copyright 2012 Addison Wesley All rights reserved 1 2 Minimal Hardware Programming Pseudocodes What was wrong with using machine code Poor readability Poor modifiability Expression coding was tedious Machine deficiencies no indexing or floating point Copyright 2012 Addison Wesley All rights reserved 1 3 Machine Language to Pseudocodes Assembly Language Speedcoding by Backus in 1954 for IBM 701 Pseudo ops for arithmetic and math functions Conditional and unconditional branching Auto increment registers for array access Slow Only 700 words left for user program The UNIVAC Compiling System Developed by a team led by Grace Hopper Pseudocode expanded into machine code David J Wheeler Cambridge University developed a method of using blocks of re locatable addresses to solve the problem of absolute addressing Copyright 2012 Addison Wesley All rights reserved 1 4 IBM 704 and Fortran Fortran 0 1954 not implemented Fortran I 1957 Designed for the new IBM 704 which had index registers and floating point hardware This led to the idea of compiled programming languages Environment of development Computers were small and unreliable Applications were scientific No programming methodology or tools Machine efficiency was the most important concern Copyright 2012 Addison Wesley All rights reserved 1 5 Fortran I Overview First implemented version of Fortran Names could have up to six characters Post test counting loop DO Formatted I O User defined subprograms Three way selection statement arithmetic IF No data typing statements No separate compilation Compiler released in April 1957 18 worker years of effort Programs larger than 400 lines rarely compiled correctly mainly due to poor reliability of 704 Code was very fast Quickly became widely used Copyright 2012 Addison Wesley All rights reserved 1 6 Fortran I II IV Fortran I Distributed in 1958 Independent compilation Fixed the bugs Fortran IV Evolved during 1960 62 Explicit type declarations Logical selection statement Subprogram names could be parameters ANSI standard in 1966 Fortran 77 Became the new standard in 1978 Character string handling Logical loop control statement IF THEN ELSE statement Copyright 2012 Addison Wesley All rights reserved 1 7 Fortran 90 and thereafter Fortran 90 Most significant changes from Fortran 77 Modules Dynamic arrays Pointers Recursion CASE statement Parameter type checking Fortran 95 relatively minor changes Fortran 2003 support for OOP procedure pointers interoperability with C Fortran 2008 blocks for local scopes coarrays Do Concurrent Copyright 2012 Addison Wesley All rights reserved 1 8 Fortran Evaluation Highly optimizing compilers all versions before 90 Types and storage of all variables are fixed before run time Dramatically changed forever the way computers are used in Scientific and or Engineering Programming Still in Use Copyright 2012 Addison Wesley All rights reserved 1 9 Functional Programming LISP LISt Processing language Designed at MIT by McCarthy 1958 AI research needed a language to Process data in lists rather than arrays Symbolic computation rather than numeric Only two data types atoms and lists Syntax is based on lambda calculus Copyright 2012 Addison Wesley All rights reserved 1 10 Representation of Two LISP Lists Representing the lists A B C and A B C D E F G Copyright 2012 Addison Wesley All rights reserved D 1 11 LISP Evaluation Pioneered functional programming No need for variables or assignment Control via recursion and conditional expressions Still the dominant language for AI COMMON LISP and Scheme are contemporary dialects of LISP ML Haskell and F are also functional programming languages but use very different syntax Copyright 2012 Addison Wesley All rights reserved 1 12 Common Lisp An effort to combine features of several dialects of LISP into a single language Large complex used in industry for some large applications Scheme Developed at MIT in mid 1970s Small Extensive use of static scoping Functions as first class entities Simple syntax and small size make it ideal for educational applications Copyright 2012 Addison Wesley All rights reserved 1 13 The First Step Toward Sophistication ALGOL 60 Environment of development FORTRAN had barely arrived for IBM 70x Many other languages were being developed all for specific machines No portable language all were machine dependent No universal language for communicating algorithms ALGOL 60 to design a universal language Goals 1 Close to mathematical notation 2 Good for describing algorithms 3 Must be translatable to machine code Copyright 2012 Addison Wesley All rights reserved 1 14 ALGOL 58 Not Implemented Concept of type was formalized Names could be any length Arrays could have any number of subscripts Parameters were separated by mode in out Subscripts were placed in brackets Compound statements begin end Semicolon as a statement separator Assignment operator was if had an else if clause No I O would make it machine dependent Copyright 2012 Addison Wesley All rights reserved 1 15 ALGOL 60 Overview Modified ALGOL 58 at 6 day meeting in Paris New features Block structure local scope Two parameter passing methods Subprogram recursion Stack dynamic arrays Still no I O and no string handling Copyright 2012 Addison Wesley All rights reserved 1 16 ALGOL 60 Evaluation Successes It was the standard way to publish algorithms for over 20 years All subsequent imperative languages are based on it First machine independent language First language whose syntax was formally defined BNF Failure Never widely used especially in U S Reasons Lack of I O and the character set made programs nonportable Too flexible hard to implement Competing with Fortran Entrenchment of Fortran Formal syntax description Lack of support from IBM Copyright 2012 Addison Wesley All rights reserved 1 17 COBOL Design Process First Design Meeting Pentagon May 1959 Design goals Must look like simple English Must be easy to use even if that means it will be less powerful Must broaden the base of computer users Must not be biased by current compiler problems Design committee members were all from computer manufacturers and DoD branches Design Problems arithmetic expressions subscripts Fights among manufacturers Copyright 2012 Addison Wesley All rights reserved 1 18 COBOL Evaluation Contributions First macro facility in a high level language Hierarchical data structures records Nested selection


View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view #Sebesta ch02 rev1 to use and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view #Sebesta ch02 rev1 to use and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?