Concepts in Programming Languages

Similar documents
Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2014 Euiseong Seo

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

CSCI 3136 Principles of Programming Languages

CSc 372 Comparative Programming Languages

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

Introduction. A. Bellaachia Page: 1

COSC 2P90 Programming Languages & Object-Orientation

Programming Language Concepts 1982, 1987, Outline. Period

Programming Languages, Summary CSC419; Odelia Schwartz

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2015 Euiseong Seo

Concepts of Programming Languages

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

Languages october 22, 2017 Éric Lévénez < FORTRAN III end-1958 FORTRAN II FORTRAN I october 1956

Compilation 2012 The What and Why of Compilers

Thanks! Review. Course Goals. General Themes in this Course. There are many programming languages. Teaching Assistants. John Mitchell.

Chapter 1. Preliminaries

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented

Course outline. CSE 341: Programming Languages. Why study programming languages? Course motivation and objectives. 1 lecture: Concepts

Introduction to Computer Science I

IA010: Principles of Programming Languages

LECTURE 1. Overview and History

What is a programming language?

Programming Languages 2nd edition Tucker and Noonan"

Chapter 2 Preview. Preview. History of Programming Languages. History of Programming Languages. History of Programming Languages

Low-Level Languages. Computer Programs and Programming Languages

Com S 541. Programming Languages I

SOFTWARE ARCHITECTURE 6. LISP

Why are there so many programming languages? Why do we have programming languages? What is a language for? What makes a language successful?

Objective: To learn meaning and concepts of programming. Outcome: By the end of this students should be able to describe the meaning of programming

CSc 520. Course Outline (Subject to change) Course Outline (Subject to change)... Principles of Programming Languages. Christian Collberg

Programmiersprachen (Programming Languages)

Programming (Econometrics)

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

CS 3304 Comparative Languages. Lecture 1: Introduction

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106

Early computers (1940s) cost millions of dollars and were programmed in machine language. less error-prone method needed

Introduction to Scientific Computing Languages

Principles of Programming Languages. Lecture Outline

Introduction to Scientific Computing Languages

! Broaden your language horizons. ! Study how languages are implemented. ! Study how languages are described / specified

Announcements Tues., Aug and 2. to call them ( ) ! For next time, read Learning Computing with Robots, chs.

Seminar in Programming Languages

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

Chapter 1. Preliminaries

Lecture 1: Course Introduction

Programming Paradigms

Welcome to Introduction to Computer Science I

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples

Why are there so many programming languages?

Chapter 2. Pseudocodes: Speedcoding. 2.2 Minimal Hardware Programming: Pseudocodes. Evolution of the Major Programming Languages

COMP 201: Principles of Programming

Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

Lecture 1: Course Introduction

Chapter 1 Preliminaries

Functional Programming Principles in Scala. Martin Odersky

Logic Programming II & Revision

Programming Languages: Concepts

CS A331 Programming Language Concepts

Programming Languages 1. Introduction. Oscar Nierstrasz

CS2303 C14 Systems Programming Concepts. Bob Kinicki

Discovering Computers 2008

CS508-Modern Programming Solved MCQ(S) From Midterm Papers (1 TO 22 Lectures) BY Arslan

CS383 PROGRAMMING LANGUAGES. Kenny Q. Zhu Dept. of Computer Science Shanghai Jiao Tong University

Programming (ERIM) Lecture 1: Introduction to programming paradigms and typing systems. Tommi Tervonen

Programming Languages

Introduction to Engineering Using Robotics Experiments. Dr. Yinong Chen

Chapter 1. Preview. Reason for Studying OPL. Language Evaluation Criteria. Programming Domains

MIDTERM EXAMINATION - CS130 - Spring 2005

PLAGIARISM. Administrivia. Course home page: Introduction to Programming Languages and Compilers

Introduction to Programming Languages and Compilers. CS164 11:00-12:00 MWF 306 Soda

CS558 Programming Languages


G Programming Languages - Fall 2012

Concepts of Programming Languages

What Is Computer Science? The Scientific Study of Computation. Expressing or Describing

Continuations provide a novel way to suspend and reexecute

Topic IV. Block-structured procedural languages Algol and Pascal. References:

CSCI.4430/6969 Programming Languages Lecture Notes

G Programming Languages Spring 2010 Lecture 1. Robert Grimm, New York University

CMPUT Language Paradigms. Programming Paradigms. Dr. B. Price & Dr. R. Greiner. 7th September Real languages draw upon multiple paradigms

Topic IV. Parameters. Chapter 5 of Programming languages: Concepts & constructs by R. Sethi (2ND EDITION). Addison-Wesley, 1996.

Evolution of PL s. EECS 476, Prog. Lang. Design/ page 1

INSTITUTE OF AERONAUTICAL ENGINEERING

What is programming? Elements of Programming Languages. From machine code to programming languages. What is a programming language?

Chapter 5. Names, Bindings, and Scopes

Evolution of the Major Programming Languages

5. Special Purpose Languages

Introduction P L COS 301. Fall School of Computing and Information Science University of Maine. Introduction COS 301.

Chapter 2. Evolution of the Major Programming Languages

1/14/2014. Introduction to CSE 1325 Object Oriented Programming (Using Java) Introduction (Cont.) Introduction

SKILL AREA 304: Review Programming Language Concept. Computer Programming (YPG)

Discovering Computers Chapter 13 Programming Languages and Program Development

Lecture 1. Programming II. Iztok Savnik, FAMNIT. October, 2015.

Compilation I. Hwansoo Han

Lecture 1: Introduction. 23. August, 2010

A Tour of Language Implementation

Adv. Course in Programming Languages

Transcription:

Concepts in Programming Languages Marcelo Fiore Computer Laboratory University of Cambridge 2012 2013 (Easter Term) 1

Practicalities Course web page: <www.cl.cam.ac.uk/teaching/1213/conceptspl/> with lecture slides, exercise sheet and reading material. One exam question. 2

Main books J. C. Mitchell. Concepts in programming languages. Cambridge University Press, 2003. T. W. Pratt and M. V. Zelkowitz. Programming Languages: Design and implementation (3RD EDITION). Prentice Hall, 1999. M. L. Scott. Programming language pragmatics (2ND EDITION). Elsevier, 2006. R. Sethi. Programming languages: Concepts & constructs (2ND EDITION). Addison-Wesley, 1996. 3

Topics I. Introduction and motivation. II. The first procedural language: FORTRAN (1954 58). III. The first declarative language: LISP (1958 62). IV. Block-structured procedural languages: Algol (1958 68), Pascal (1970). V. Object-oriented languages Concepts and origins: Simula (1964 67), Smalltalk (1971 80). VI. Types in programming languages: ML (1973 1978). VII. Data abstraction and modularity: SML Modules (1984 97). VIII. The state of the art: Scala (2007) 4

Topic I Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003. Chapter 1 of Programming languages: Design and implementation (3RD EDITION) by T. W. Pratt and M. V. Zelkowitz. Prentice Hall, 1999. Chapter 1 of Programming language pragmatics (2ND EDITION) by M. L. Scott. Elsevier, 2006. 5

Goals Critical thinking about programming languages.? What is a programming language!? Study programming languages. Be familiar with basic language concepts. Appreciate trade-offs in language design. Trace history, appreciate evolution and diversity of ideas. Be prepared for new programming methods, paradigms. 6

Why study programming languages? To improve the ability to develop effective algorithms. To improve the use of familiar languages. To increase the vocabulary of useful programming constructs. To allow a better choice of programming language. To make it easier to learn a new language. To make it easier to design a new language. To simulate useful features in languages that lack them. To make better use of language technology wherever it appears. 7

What makes a good language? Clarity, simplicity, and unity. Orthogonality. Naturalness for the application. Support of abstraction. Ease of program verification. Programming environments. Portability of programs. 8

Cost of use. Cost of execution. Cost of program translation. Cost of program creation, testing, and use. Cost of program maintenance. 9

What makes a language successful? Expressive power. Ease of use for the novice. Ease of implementation. Open source. Excellent compilers. Economics, patronage, and inertia. 10

Computer capabilities. Applications. Programming methods. Implementation methods. Theoretical studies. Standardisation. Influences 11

Applications domains Era Application Major languages Other languages 1960s Business COBOL Assembler Scientific FORTRAN ALGOL, BASIC, APL System Assembler JOVIAL, Forth AI LISP SNOBOL Today Business COBOL, SQL, spreadsheet C, PL/I, 4GLs Scientific FORTRAN, C, C++ BASIC, Pascal Maple, Mathematica System BCPL, C, C++ Pascal, Ada, BASIC, MODULA AI Publishing LISP, Prolog T E X, Postscript, word processing Process UNIX shell, TCL, Perl Marvel, Esterel New paradigms Smalltalk, SML, Haskell, Java Eifell, C#, Scala Python, Ruby 12

? Why are there so many languages? Evolution. Special purposes. Personal preference. 13

Motivating application in language design A specific purpose provides focus for language designers; it helps to set criteria for making design decisions. A specific, motivating application also helps to solve one of the hardest problems in programming language design: deciding which features to leave out. 14

Examples: Good languages designed with a specific purpose in mind. LISP: symbolic computation, automated reasoning FP: functional programming, algebraic laws BCPL: compiler writing Simula: simulation C: systems programming ML: theorem proving Smalltalk: Dynabook Clu, SML Modules: modular programming C++: object orientation Java: Internet applications 15

Program execution model Good language design presents abstract machine. FORTRAN: Flat register machine; memory arranged as linear array LISP: cons cells, read-eval-print loop Algol family: stack of activation records; heap storage BCPL, C: underlying machine + abstractions Simula: Object references FP, ML: functions are basic control structure Smalltalk: objects and methods, communicating by messages Java: Java virtual machine 16

Classification of programming languages Imperative procedural C, Ada, Pascal, Algol, FORTRAN,... object oriented Scala, C#,Java, Smalltalk, SIMULA,... scripting Perl, Python, PHP,... Declarative functional Haskell, SML, Lisp, Scheme,... logic dataflow constraint-based template-based Prolog Id, Val spreadsheets XSLT 17