Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CS314 Fall 2007: Principles of Programming Languages - Course Introduction and Syllabus, Exams of Computer Science

An introduction to the cs314: principles of programming languages course offered at rutgers university in the fall of 2007. The course goals, the importance of learning multiple programming languages, and an overview of the history of programming languages. The syllabus includes topics such as formal languages, logic programming, functional programming, and parallel programming.

Typology: Exams

Pre 2010

Uploaded on 09/17/2009

koofers-user-fn7
koofers-user-fn7 🇺🇸

10 documents

1 / 13

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
Introduction 1, CS314 Fall 2007 ©, BG Ryder
1
198:314 Principles of
198:314 Principles of
Programming Languages
Programming Languages
Fall 2007
Fall 2007
http://remus.rutgers.edu/cs314/f2007/ryder
http://remus.rutgers.edu/cs314/f2007/ryder
Professor Barbara G. Ryder
CoRE 311, 732-445-6430 x3699
ryder@cs.rutgers.edu
http://www.cs.rutgers.edu/~ryder
Introduction 1, CS314 Fall 2007 ©, BG Ryder
2
Introduction
Introduction
Administrivia
Why study PLs?
Translation of programs for execution, Scott
Ch 1
History of Programming Languages
pf3
pf4
pf5
pf8
pf9
pfa
pfd

Partial preview of the text

Download CS314 Fall 2007: Principles of Programming Languages - Course Introduction and Syllabus and more Exams Computer Science in PDF only on Docsity!

Introduction 1, CS314 Fall 2007 ©, BG Ryder

1

198:314 Principles of 198:314 Principles of

Programming Languages

Programming Languages

Fall 2007 Fall 2007

http://remus.rutgers.edu/cs314/f2007/ryder http://remus.rutgers.edu/cs314/f2007/ryder

Professor Barbara G. Ryder

CoRE 311, 732-445-6430 x

ryder@cs.rutgers.edu

http://www.cs.rutgers.edu/~ryder

Introduction 1, CS314 Fall 2007 ©, BG Ryder

2

Introduction

Introduction

• Administrivia

• Why study PLs?

• Translation of programs for execution, Scott

Ch 1

• History of Programming Languages

Introduction 1, CS314 Fall 2007 ©, BG Ryder

3

198:314 Fall 2007

198:314 Fall 2007

• Class webpage

http:http://remus//remus..rutgersrutgers.edu/cs314/f2007/ryder/index.html.edu/cs314/f2007/ryder/index.html

  • Look at Course Information for course rules,

grading, exam policy, etc.

  • Read about Academic Integrity
  • Review posted Syllabus (class Syllabus shows

related readings in Scott text) and look at

important dates

  • Check Projects and Homeworks for assignments
  • Visit Useful Websites for additional info on PLs

we will study

Introduction 1, CS314 Fall 2007 ©, BG Ryder

4

198:314 Fall 2007

198:314 Fall 2007

• Three programming projects will be posted

and submitted for grading electronically

• Midterm Exam on October 23, 2007 and

Final Exam on December 19, 2007

• Lecture notes webpage

  • http://remus.rutgers.edu/cs314/f2007/ryder/lectures/
  • Lecture notes available online in PDF by noon of day of

class (and hopefully before)

  • Slides posted in 2-up format; to save paper print double-

sided

  • Recitation attendance and participation counts in your final

grade!

Introduction 1, CS314 Fall 2007 ©, BG Ryder

7

What is a programming language?

What is a programming language?

“a language intended for use by a person to express a

process by which a computer can solve a problem”

--Hope and Jipping

“a set of conventions for communicating an algorithm”

--E. Horowitz

“ the art of programming is the art of organizing

complexity”

--E. Dijkstra, 1972

Introduction 1, CS314 Fall 2007 ©, BG Ryder

8

Why learn more than one PL?

Why learn more than one PL?

  • Each language paradigm encourages thinking about a

problem in a particular manner

  • Finding a natural match between problem and PL
  • Somewhat different functionality supplied by

different paradigms

  • Computer professionals must be multi-lingual
    • PLs change over time as computer architecture and

computing model changes

  • Specific applications sometimes result in specialized PLs
  • Need to understand each PL’s functionality and limitations
  • Also need to understand some things about PL

implementation, in order to us the PL effectively

Introduction 1, CS314 Fall 2007 ©, BG Ryder

9

Translation

Translation

• Compilation : translation of a program written

in a high-level PL into a form that is

executable on the machine

compiler

Source code

target program input

output

Scott Ch 1.

Introduction 1, CS314 Fall 2007 ©, BG Ryder

10

Translation

Translation

• Interpretation : a program is translated and

executed one statement at a time

• Most PL systems are a mixture of compilation

and interpretation

  • Interpreted: Java, Scheme, Prolog
  • Compiled: Fortran, C, C++

source code

input

output interpreter

Introduction 1, CS314 Fall 2007 ©, BG Ryder

13

Compilation

Compilation

scanner

parser

intermediate

code

generator

position = initial + rate * 60;

id1 := id2 + id3 * 60

optimizer

code generator

Introduction 1, CS314 Fall 2007 ©, BG Ryder

14

Compilation

Compilation

scanner

parser

intermediate

code

generator

symbol table

(position, ...)

(initial, …)

(rate, …)

:= parse tree

id

id2 *

id3 int-2-real

tmp1 = inttoreal (60)

tmp2 = id3 * tmp

tmp3 = id2 + tmp

id1 = tmp

Introduction 1, CS314 Fall 2007 ©, BG Ryder

15

Compilation

Compilation

optimizer

code generator

Machine dependent

code improvement

tmp1 = inttoreal (60)

tmp2 = id3 * tmp

id1 = id2 + tmp

movf id3, R

mulf #60.0, R

movf id2, R

addf R2, R

movf R1, id

move R1, R-base, R-offset

movf R1, 45733

Introduction 1, CS314 Fall 2007 ©, BG Ryder

16

History of

History of

PLs

PLs

• Prehistory

  • 300 B.C. Greece, Euclid invented the greatest

common divisor algorithm - oldest known algorithm

  • ~1820-1850 England, Charles Babbage invented 2

mechanical computational devices

  • difference engine
  • analytical engine
  • Countess Ada Augusta of Lovelace, first computer

programmer

  • Precursors to modern machines
    • 1940 ’s United States, ENIAC developed to calculate

trajectories

ACM SIGPLAN HOPL conferences

Introduction 1, CS314 Fall 2007 ©, BG Ryder

19

History of

History of

PLs

PLs

  • APL 1956-60 Ken Iverson, (IBM on 360,

Harvard) designed for array processing

  • LISP 1956-62, John McCarthy (MIT on IBM704,

Stanford) designed for non-numerical computation

  • uniform notation for program and data
  • new conditional control structure (COND)
  • recursion as main control structure
  • Snobol 1962-66, Farber, Griswold, Polansky (Bell

Labs) designed for string processing

Introduction 1, CS314 Fall 2007 ©, BG Ryder

20

Hisory

Hisory

of

of

PLs

PLs

  • PL/I 1963-66, IBM designed for general purpose

computing [Fortran, Algol60, Cobol]

  • user controlled exceptions
  • multi-tasking
  • Simula-67 1967, Dahl and Nygaard (Norway)

designed as a simulation language [Algol60]

  • data abstraction
  • inheritance of properties
  • Algol68 1963-68, designed for general purpose

computing [Algol60]

  • orthogonal language design
  • interesting user defined types

Introduction 1, CS314 Fall 2007 ©, BG Ryder

21

History of

History of

PLs

PLs

  • Pascal 1969, N. Wirth(ETH) designed for

teaching programming [Algol60]

  • 1 pass compiler
  • call-by-value semantics
  • Prolog 1972, Colmerauer and Kowalski designed

for Artificial Intelligence applications

  • theorem proving with unification as basic operation
  • logic programming

• Recent

  • C 1974, D. Ritchie (Bell Labs) designed for

systems programming

  • allows access to machine level within high-level PL
  • efficient code generated

Introduction 1, CS314 Fall 2007 ©, BG Ryder

22

History of

History of

PLs

PLs

  • Clu 1974-77, B. Liskov (MIT) designed for

simulation [Simula]

  • supports data abstraction and exceptions
  • precise algebraic language semantics
  • attempt to enable verification of programs
  • Smalltalk mid-1970s, Alan Kay (Xerox Parc),

considered first real object-oriented PL, [Simula]

  • encapsulation, inheritance
  • easy to prototype applications
  • hides details of underlying machine
  • Scheme mid-1970s, Guy Steele, Gerald Sussman

(MIT)[Lisp]

  • Static scoping and first-class functions

Introduction 1, CS314 Fall 2007 ©, BG Ryder

25

History of

History of

PLs

PLs

  • Python ~
    • Object-oriented + functional aspects, good for fast

prototyping, framework programming (large # of runtime

libraries)

  • Haskell98 ~
    • Polymorphic, typed, lazy, purely functional
  • Php ~
    • Embedded scripting language for dynamic webpage

construction