Spring 2010 CS 214 Programming Languages. Details Course homepage: cs.calvin.edu/curriculum/cs/214/ Important dates: February 19: Project language choice.

Slides:



Advertisements
Similar presentations
Chapter 1: Preliminaries
Advertisements

Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
1 ) Definition 2) Note on structured and modular programming, and information hiding 3) Example imperative languages 4) Features of imperative languages.
CS 354 Overview. Addison-Wesley –2 Course Topics What is a programming language? What features do programming languages have? How are these features.
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.
ISBN Chapter 1 Preliminaries. Copyright © 2007 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
CS 354 Overview. Copyright © 2007 Addison-Wesley. All rights reserved. 1–2 Course Topics What is a programming language? What features do programming.
Programming Languages Structure
ISBN Lecture 01 Preliminaries. Copyright © 2004 Pearson Addison-Wesley. All rights reserved.1-2 Lecture 01 Topics Motivation Programming.
6/27/2015G. Levine1 PROGRAMMING LANGUAGES Text: Programming Languages, Design and Implementation Pratt and Zelkowitz 4 th ed. Prentice-Hall.
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.
ISBN Chapter 2 Evolution of the Major Programming Languages.
Programming Language Concepts
1 Programming Languages Marjan Sirjani 2 1- The Study of Programming Languages The purpose of language is simply that it must convey meaning. (Confucius)
Chapter 1 Preliminaries. Copyright © 2012 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of Programming Languages.
C H A P T E R O N E Overview.
BIT Presentation 6. Contents GENERATIONS OF LANGUAGES COMPILERS AND INTERPRETERS VIRTUAL MACHINES OBJECT-ORIENTED PROGRAMMING SCRIPTING LANGUAGES.
Overview. Copyright © 2006 The McGraw-Hill Companies, Inc. Chapter 1 Overview A good programming language is a conceptual universe for thinking about.
CS 355 – Programming Languages
CS 363 Comparative Programming Languages
ISBN Chapter 2 Evolution of the Major Programming Languages.
Chapter 1 Preliminaries CS Concepts of Programming Languages.
Programming Languages –14 David Watt (Glasgow) Steven Wong (Singapore) Moodle : Computing Science → Level 3 → Programming Languages 3 © 2012 David.
1 Programming Languages Marjan Sirjani Course web site:
1 Programming Language History and Evolution In Text: Chapter 2.
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.
ICS 313 Fundamentals of Programming Languages Instructor: Abdul Wahid Wali Lecturer, CSSE, UoH
ISBN Chapter 1 Preliminaries. Corrected and improved by Assoc. Prof. Zeki Bayram, EMU, North Cyprus. Original Copyright © 2007 Addison-Wesley.
ISBN CS 354 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Course Topics What is a programming language? What features.
ISBN Chapter 1 Preliminaries. Copyright © 2015 Pearson. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of Programming.
ISBN Chapter 1 Preliminaries. Copyright © 2009 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
Spring 2012 CS 214 Programming Languages. Details Moodle! REQUIRED text: Sebesta, Programming Language Concepts, 9ed. Important dates: February 17: Project.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 1 Overview A good programming language is.
a medium allowing humans and computers to communicate an abstraction of the real world a notation for expressing algorithms the set of all syntactically.
History. Development Driven by Function Functions of a Programming Language –To describe computation for use by computers –To describe computation and.
Language Paradigms CS655.
ISBN Chapter 1 Preliminaries. Copyright © 2006 Addison-Wesley. All rights reserved.1-2 Chapter 1 Topics Reasons for Studying Concepts of.
Programming Language History and Evolution
Programming Languages 2nd edition Tucker and Noonan
A BRIEF HISTORY OF PROGRAMMING LANGUAGES
Concepts of Programming Languages
Basic 1960s It was designed to emphasize ease of use. Became widespread on microcomputers It is relatively simple. Will make it easier for people with.
Why study programming languages?
Basic 1964 PC general purpose Imperative Small Easy to use.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
PROGRAMMING LANGUAGES
CSCI-235 Micro-Computer Applications
Programming Language History and Evolution
Chapter 1 Introduction.
Ada – 1983 History’s largest design effort
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Programming Languages 2nd edition Tucker and Noonan
Chapter 1 Preliminaries.
Chapter 1 Topics Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation Criteria Influences on Language Design.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Chapter 1 Preliminaries.
Presentation transcript:

Spring 2010 CS 214 Programming Languages

Details Course homepage: cs.calvin.edu/curriculum/cs/214/ Important dates: February 19: Project language choice March 5: Test 1 March 19: Project proposal April 16: Test 2 May 10-12: Final project presentations Final Exam: May 15, 1:30p

Programming Language History In the beginning… Binary machine language Difficult to write Prone to programmer errors Difficult to debug

Assembly Languages Mnemonic for each operation Symbolic names instead of memory addresses Programs called assemblers automate translation MOV ADD STO MOV I ADD J STO K IJKIJK

Assembly Languages Pros: Not quite so cumbersome Somewhat less error prone Cons: Not portable Not intuitive

High Level Languages Rear Admiral Grace Hopper 1952: Develops first compiler called, simply, A The Idea: Write code independent of the machine-level details Use a compiler to translate into machine language k = i + j; MOV I ADD J STO K compiler assembler

Edsger Dijkstra Quotes The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offense. It is practically impossible to teach good programming to students who have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. APL is a mistake, carried through to perfection. It is the language of the future for the programming techniques of the past: it creates a new generation of coding bums.

High Level Languages 1950s  1957: Backus et al design FORTRAN  FORmula TRANslation; for scientific users  Subsequent versions in ‘58, ‘62, ‘77, ‘90, ‘95  1959: Hopper et al design COBOL  Emphasized readability; for business users  Introduced If-Then-Else statement  1959: McCarthy designs LISP  LISt Processing; introduced the linked list as primitive type  First functional programming language (every op is a function)  Also introduced dynamic scope, garbage collection

Early 1960s  1960: Wirth et al design Algol-60  ALGOrithmic Language: designed for encoding algorithms  Introduces block structure: basis for structured programming  Introduces procedures: basis for procedural programming  1964: Wirth designs Algol-W, with the case statement  1964: Kemeny and Kurtz design BASIC  1965: IBM designs PL-1  Introduces multi-tasking, exception-handling  1967: Nyquist & Dahl design Simula  SIMULAtion HLL; introduces class construct  Laid foundation for O-O programming

Late 1960s and early 1970s  1968: Wirth designs Algol-68  Introduces If-Then-Elseif statement; pointer variables  1970: Wirth designs Pascal  Consolidates Algol-x features into one simple language  1970: Ritchie designs C for OS implementation (Unix)  Provides direct hardware access, separate compilation/linking  AKA “high level assembly language” and “Fortran done right”  1972: Colmerauer, Roussel & Kowalski design Prolog  PROgramming LOGic; designed for logic programming  Logic/predicate-based HLL for programming inferences  First logic HLL; used in expert systems

1970s continued  1977: Gordon & Milner design ML (MetaLanguage)  Hybrid HLL: functional, with inference rules (Prolog)  Allows linked ADTs to be defined without pointers (recursively)  AKA a “higher level language”  1979: Hoare designs CSP  Introduces support for concurrent programming  1980: Xerox PARC team designs Smalltalk  First pure object-oriented language (inheritance, polymorphism)  Program statements translated to byte code, not machine code  Introduces virtual machine to execute byte code  Functions replaced by methods, calls by messages

Early 1980s  1980: Wirth designs Modula-2  Introduces the module - a container for types and operations  1981: DOD designs Ada  Algol-family HLL  Introduces generic types, task synchronization (rendezvous)  1983: May designs Occam  Concurrent HLL based on CSP  1983: LLNL designs SISAL  Concurrent HLL for array-processing on supercomputers  1984: Sussman & Abelson design Scheme  Simplified easier-to-use Lisp, with static scope

Later 1980s  1984: Jordan designs The Force  First HLL for programming SIMD multiprocessors  1986: Stroustrup designs C++  Hybrid language: (procedural) C with object-oriented features  Parameterized types via macro-substitution (templates)  1987: Wall designs Perl  Interpreted procedural language; features of C, sh, awk, sed, Lisp  1988: Wirth designs Oberon  Algol-family with features for OO and systems programming  1988: Mehrotra & van Rosendale design Kali  First language for programming MIMD multiprocessors

Early 1990s  1990: Hudak & Wadler design Haskel  Hybrid language: functional and OO features  1990: van Rossum designs Python  Scripting language; features from Perl, Scheme, Smalltalk, Tcl  Focus on readability, ease for the person instead of the machine  1991: Microsoft designs Visual Basic  BASIC with integrated support for building GUIs  Later versions add OO features  VB controls are most-reused “objects” in the world  1993: High Performance Fortran (HPF) released  Fortran extended for SIMD and MIMD multiprocessors

Late 1990s  1994: Perl-5 released  OO features added to Perl  1995: Ada-95 released  OO features added to original Ada (renamed Ada-8x)  1995: Matsumoto releases Ruby  Fully OO scripting language; features from Perl, Python, …  Emphasis on making menial programming tasks easy  1996: Gosling et al. design Java  C++ syntax, Smalltalk philosophy  Extensive class library (networking, graphics, threads, etc.)  Provides Java Virtual Machine (JVM) for platform-independence  Support for both applications and applets (run via www-browser)

Development continues PHP (1995) UML (1996) C# (2000) Scriptol (2001) Scala (2004) … Not to mention hundreds of other languages developed along the way!

Programming Paradigms Imperative / Procedural Central features are variables, assignment statements, and iteration Write blocks of statements e.g. C, Pascal Functional Main means of making computations is by applying functions to given parameters Write functions, pass arguments e.g. LISP, Scheme Logic Rule-based (rules are specified in no particular order) Write inference rules e.g. Prolog Object-oriented Data abstraction, inheritance, late binding Build objects, send messages e.g. Java, C++ Concurrent Build communicating processes/threads/tasks e.g. CSP, Occam

Markup: New; not a programming per se, but used to specify the layout of information in Web documents e.g. XHTML, XML

FORTRAN COBOL BASIC ALGOL-60 ALGOL-W ALGOL-68 Pascal PL/1 Lisp Simula PrologC Modula ML Smalltalk FORTRAN-II Modula-2 C++ Scheme Ada Ada-95 Haskel Oberon Java Visual Basic Visual Basic s 1970s 1980s 1990s Fortran-90 FORTRAN-IV Fortran-77 Fortran-95 Perl Perl-5 Python awksed Procedural OOFunctionalLogic 1950s

How to decide? Readability: the ease with which programs can be read and understood Writability: the ease with which a language can be used to create programs Reliability: conformance to specifications (i.e., performs to its specifications) Cost: the ultimate total cost Portability, Generality, Well-definedness

Trade-offs Reliability vs. cost of execution Example: Java demands all references to array elements be checked for proper indexing but that leads to increased execution costs Readability vs. writability Example: APL provides many powerful operators (and a large number of new symbols), allowing complex computations to be written in a compact program but at the cost of poor readability Writability (flexibility) vs. reliability Example: C++ pointers are powerful and very flexible but not reliably used

Implementation Methods Compilation Programs are translated into machine language Pure Interpretation Programs are interpreted by another program known as an interpreter Hybrid Implementation Systems A compromise between compilers and pure interpreters