6/27/2015G. Levine1 PROGRAMMING LANGUAGES Text: Programming Languages, Design and Implementation Pratt and Zelkowitz 4 th ed. Prentice-Hall.

Slides:



Advertisements
Similar presentations
Chapt.2 Machine Architecture Impact of languages –Support – faster, more secure Primitive Operations –e.g. nested subroutine calls »Subroutines implemented.
Advertisements

Agenda Definitions Evolution of Programming Languages and Personal Computers The C Language.
Programming Paradigms and languages
Adapted from Scott, Chapter 6:: Control Flow Programming Language Pragmatics Michael L. Scott.
Programming Paradigms Introduction. 6/15/2005 Copyright 2005, by the authors of these slides, and Ateneo de Manila University. All rights reserved. L1:
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Programming Creating programs that run on your PC
Programming Languages Language Design Issues Why study programming languages Language development Software architectures Design goals Attributes of a good.
1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages.
G. Levine Chapter 6 Chapter 6 Encapsulation –Why do we want encapsulation? Programmer friendliness- programmer need not know about these details –Easier.
Reasons to study concepts of PL
ISBN Chapter 1 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Motivation Programming Domains.
A Quick Overview of Languages. FORTRAN Designed in 1955 First release of the compiler in 1957 Algebraic in nature Scientific (numeric not string oriented)
Programming Languages Structure
Chapter 3 Program translation1 Chapt. 3 Language Translation Syntax and Semantics Translation phases Formal translation models.
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
Summer 02-03Programming Language Concepts1 Programming Language Concepts (CS 360) Lecture 1: Overview, Grammars, and Little Languages Jeremy R. Johnson.
ISBN Chapter 1 Topics Motivation Programming Domains Language Evaluation Criteria Influences on Language Design Language Categories Language.
CS 104 Introduction to Computer Science and Graphics Problems Software and Programming Language (2) Programming Languages 09/26/2008 Yang Song (Prepared.
CSCE 330 Project Algol 68 Joe PuzioWael AL-Fayez Gaurav ShahRonak Patel.
1.3 Executing Programs. How is Computer Code Transformed into an Executable? Interpreters Compilers Hybrid systems.
Programming Language Concepts
CS102 Introduction to Computer Programming
Language Evaluation Criteria
314450: PROGRAMMING PARADIGMS Teaching scheme: Examination Scheme: Lectures: 3 Hours/Week Theory: 100 Marks OBJECTIVE: To understand the basic building.
PROGRAMMING LANGUAGES The Study of Programming Languages.
Programming Languages – Coding schemes used to write both systems and application software A programming language is an abstraction mechanism. It enables.
Overview. Copyright © 2006 The McGraw-Hill Companies, Inc. Chapter 1 Overview A good programming language is a conceptual universe for thinking about.
Chapter 17 Programming Tools The Architecture of Computer Hardware and Systems Software: An Information Technology Approach 3rd Edition, Irv Englander.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
PZ01A Programming Language design and Implementation -4th Edition Copyright©Prentice Hall, PZ01A -- Introduction Programming Language Design and.
(1.1) COEN 171 Programming Languages Winter 2000 Ron Danielson.
Chapter 1. Introduction.
The Evolution of the Object Model OOAD. The Evolution of the Object Model software engineering trends observed The shift in focus from programming-in-the-small.
CS 363 Comparative Programming Languages
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
1 Programming Language History and Evolution In Text: Chapter 2.
1 Introduction Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Sections
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Computer Programs and Programming Languages What are low-level languages and high-level languages? High-level language Low-level language Machine-dependent.
1 Lecture 2 : Computer System and Programming. Computer? a programmable machine that  Receives input  Stores and manipulates data  Provides output.
COP4020 Programming Languages Names, Scopes, and Bindings Prof. Xin Yuan.
Ch. 5 Ch. 51 jcmt CSE 3302 Programming Languages CSE3302 Programming Languages (more notes) Dr. Carter Tiernan.
The Evolution of Programming Languages Day 2 Lecturer: Xiao Jia The Evolution of PLs1.
Theory of Programming Languages Introduction. What is a Programming Language? John von Neumann (1940’s) –Stored program concept –CPU actions determined.
FOUNDATION IN INFORMATION TECHNOLOGY (CS-T-101) TOPIC : INFORMATION SYSTEM – SOFTWARE.
FORTRAN History. FORTRAN - Interesting Facts n FORTRAN is the oldest Language actively in use today. n FORTRAN is still used for new software development.
Ch. 5 Ch. 51 jcmt Summer 2003Programming Languages CSE3302 Programming Languages (more notes) Summer 2003 Dr. Carter Tiernan.
1-1 1 Introduction  Programming linguistics: concepts and paradigms syntax, semantics, and pragmatics language processors.  Historical development of.
Ch Ch jcmt CSE 3302 Programming Languages CSE3302 Programming Languages Dr. Carter Tiernan.
1 Asstt. Prof Navjot Kaur Computer Dept PRESENTED BY.
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
1 jcmt Summer 2003Programming Languages CSE3302 Programming Languages Summer 2003 Dr. Carter Tiernan.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
Programming Language History and Evolution
Chapter 1. Introduction.
Zuse’s Plankalkül – 1945 Never implemented Problems Zuse Solved
Why study programming languages?
Chapter 1 Introduction.
CSCI-235 Micro-Computer Applications
Chapter 1 Introduction.
课程名 编译原理 Compiling Techniques
Programming Language History and Evolution
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Ada – 1983 History’s largest design effort
Programming Languages 2nd edition Tucker and Noonan
Principles of Programming Languages
강의 내용 및 방법 접근방법 리포트 시험 Lambda Calculus, Proof of Correctness
Programming Languages and Paradigms
Presentation transcript:

6/27/2015G. Levine1 PROGRAMMING LANGUAGES Text: Programming Languages, Design and Implementation Pratt and Zelkowitz 4 th ed. Prentice-Hall

6/27/2015G. Levine2 Introduction Concepts underlying all computer programming  Assist in learning new languages  Assist in understanding current languages  Efficiency, reliability considerations  Design and reuse considerations  Implementation details G. Levine  

6/27/2015G. Levine3 Topics of Discussion History of development of programming languages Development of specific language features Language implementation/environment Language features Programming in specific languages

6/27/2015G. Levine4 Language Paradigms Imperative/ procedural languages  Assignment statement is chief characteristic – places value in CELL  consider x = x *x + 1 Functional/ applicative languages  (sum (times (x x) 1)) not placed in x Rule-based / logic programming Object-oriented programming  Imperative style in the small  Module communication similar to applicative languages Concurrent programming  Need for synchronization

6/27/2015G. Levine5 History of Programming Languages 1 st generation – machine language  Octal representation of  op code  operand (s) – memory or register cells 2 nd generation- assembly language  Symbolic op codes, operands  Translated by assembler to machine language  Delay in binding from writing to translating time of symbolic name to machine address

6/27/2015G. Levine6 1 st and 2 nd generation languages continued Problems  Not portable- specific to hardware  Difficult to read, i.e., maintain  Consider as an instruction  Difficult to write (see above)  Lack of structures in machine language  Data- support for arrays (block memory) Array looping with self modifying code  Control - conditional and jump (goto) Some reuse already existed –  Programmers shared debugged i/o and mathematical routines

6/27/2015G. Levine7 Beginning of 3 rd generation languages Grace Hopper- early 1950s A-O, B-O  use of subroutines  scientific (military uses) Lack of hardware support

6/27/2015G. Levine8 FORTRAN I(Backus & team) History – see   Goals  Efficiency (still valid)  Formula translation – scientific applications  Research Contributions  Expressions (precendence rules,.GT., etc.)  Multidimensional array manipulation  Do loops  IBM704- index registers, keyboard included +, /, *

6/27/2015G. Levine9 Early FORTRAN – disadvantages Concern for storage – use of equivalence, etc. Fixed format; no reserved words; blanks ignored Implicit typing Spaghetti code Loop and conditional hard to distinguish No record type

6/27/2015G. Levine10 Obsolete example from Fortran Do loop test at bottom at loop Do 10 I = M, A (I) = 5 If M > 0 this still executed once. G.L. Assembler: Load I5 register1 (R1) LOOPStore 5 Array DecR1 BZR1OUT Inc LOOP JmpLOOP OUT

6/27/2015G. Levine11 Another obsolete example from FORTRAN Equivalence (A, B) Dimension A(100), B(100) Real A, B  overlay Or Dimension A(100), B(50) Real A, Complex B  alias

6/27/2015G. Levine12 Why FORTRAN was successful? Evolved: Fortran II, IV, 77, 90  Upward compatibility Portability  Compiled languages can be machine independent – role of standardization Efficiency  Array manipulation  Static storage allocation Support for numeric applications  Complex numbers as primitive data type Strong support from IBM

6/27/2015G. Levine13 LISP (List Processing McCarthy ) Functional language Symbolic applications (A.I.) Recursion and conditional as control structures List as primitive data structure Garbage collection

6/27/2015G. Levine14 ALGOL (Backus + team) ) Algorithmic language  Free format  Structured control  Sequence, conditional, loop  Blocks (scope rules)  stack storage allocation (recursion)  Own (static) variables  BNF – meta language to precisely define a language I/O not defined – NOT PORTABLE

6/27/2015G. Levine15 COBOL –1960s Business Applications Fixed Format Stress on data structures  Data division  Record type  Fixed point type “circles” of compilers for advanced business capabilities Toc Toc

6/27/2015G. Levine16 Example from COBOL Data defined by bytes  Great for portability  (note that C’s int type may be implemented by 16 or 32 bits)  Need to save storage. 01 Date. 05 Month pic Date pic Year pic 99. – y2K  This feature was an option in PL/1

6/27/2015G. Levine17 Why COBOL was (is) successful? DoD Support Easy to read  Self documenting Fairly easy to write  English type statements  (perform 5 times) Great data support  Interface to databases

6/27/2015G. Levine18 Other languages PL/1- late 60s – all purpose language – pointers, exception handling Simula67- simulation language- classes and coroutines Smalltalk –late 1970s- object oriented; entire programming environment C s – system programming (UNIX)  Small, efficient, Bell Labs support Ada83 – software engineering principles C s object oriented C Java – 1990s – for the Internet 4GLs and script languages

6/27/2015G. Levine19 Environments Early batch systems  Efficiency of time and space Time-sharing systems  User Friendliness  Interactive I/O PC and the Internet  Graphical features Embedded systems  Time constraints (hard real time)  Parallel activities  Error control  Reliability

6/27/2015G. Levine20 What should we look for in a language? Research contributions Strengths, weaknesses  Specific or general applications Support of Control abstraction Support of Data abstraction Support of Reuse  Modification/ maintainability  Portability  Generality Efficiency  Compiled or interpreted

6/27/2015G. Levine21 Syntax and Semantics Syntax – rules of the language  first compiler phase is parsing, which determines whether module is a valid string of the language Semantics- what goes into the cells and when We’ll see many examples of different ways that syntax can be interpreted  Ex: parameter passing Orthogonality – whether valid syntactic elements can be combined  Ex: a file cannot be a value parameter in Pascal