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

PLT Course at Columbia: Guest Lecture by Alfred V. Aho, Lecture notes of Programming Languages

A guest lecture by Alfred V. Aho at Columbia University on the PLT course. The lecture covers course objectives, language issues, compiler issues, and team issues. It also discusses the importance of software in today's world, computational thinking, programming languages, and evolutionary forces driving PL changes. The document could be useful as study notes, lecture notes, summary, or university essay for students taking PLT courses or interested in software development.

Typology: Lecture notes

2021/2022

Uploaded on 05/11/2023

lalitdiya
lalitdiya 🇺🇸

4.3

(25)

240 documents

1 / 52

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
The PLT Course at Columbia
Alfred V. Aho
aho@cs.columbia.edu
Guest Lecture
PLT September 10, 2014
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34

Partial preview of the text

Download PLT Course at Columbia: Guest Lecture by Alfred V. Aho and more Lecture notes Programming Languages in PDF only on Docsity!

The PLT Course at Columbia

Alfred V. Aho

aho@cs.columbia.edu

Guest Lecture

PLT September 10, 2014

Outline

  • Course objectives
  • Language issues
  • Compiler issues
  • Team issues

Plus Learning Three Vital Skills for Life

Project management

Teamwork

Communication both oral and written

The Importance of Software in Today’s World

How much software does the world use today?

Guesstimate: around one trillion lines of source code

What is the sunk cost of the legacy software base?

$100 per line of finished, tested source code

How many bugs are there in the legacy base?

10 to 10,000 defects per million lines of source code

Alfred V. Aho

Software and the Future of Programming Languages

Science, v. 303, n. 5662, 27 February 2004, pp. 1331-

Why Take PLT?

To discover the beautiful marriage of

theory and practice in compiler design

“Theory and practice are not mutually exclusive;

they are intimately connected. They live together

and support each other.” [D. E. Knuth, 1989]

Theory in practice: regular expression pattern matching in

Perl, Python, Ruby vs. AWK

Running time to check whether a****? nan^ matches an

regular expression and text size n

Russ Cox, Regular expression matching can be simple and fast (but is slow in Java, Perl, PHP,

Python, Ruby, ...) [http://swtch.com/~rsc/regexp/regexp1.html, 2007]

What is Computational Thinking?

The thought processes involved

in formulating a problem and

expressing its solution in a way

that a computer − human or

machine − can effectively carry it

out

A. V. Aho Computation and Computational Thinking The Computer Journal 55:12, pp. 832-835, 2012

Jeannette M. Wing Joe Traub 80th^ Birthday Symposium Columbia University, November 9, 2012

What is a Programming Language?

A programming language is a notation for describing computations

to people and to machines.

Target Languages and Machines

Another programming language

CISCs

RISCs

Parallel machines

Multicores

GPUs

Quantum computers

How Many PLs are There Today?

Guesstimate: thousands

The website http://www.99-bottles-of-beer.net has programs in over 1,500 different programming languages and variations to print

the lyrics to the song “99 Bottles of Beer.”

99 Bottles of Beerin AWK

BEGIN {

for(i = 99; i >= 0; i--) { print ubottle(i), "on the wall,", lbottle(i) "." print action(i), lbottle(inext(i)), "on the wall." print } } function ubottle(n) { return sprintf("%s bottle%s of beer", n? n : "No more", n - 1? "s" : "") } function lbottle(n) { return sprintf("%s bottle%s of beer", n? n : "no more", n - 1? "s" : "") } function action(n) { return sprintf("%s", n? "Take one down and pass it around," :
"Go to the store and buy some more,") } function inext(n) { return n? n - 1 : 99 }

99 Bottles of Beerin Perl

''=~( '(?{' .('`' |'%') .('[' ^'-')

.('' |'!') .('' |',') .'"'. '\$'

.'==' .('[' ^'+') .('`' |'/') .('['

^'+') .'||' .(';' &'=') .(';' &'=')

.';-' .'-'. '\$' .'=;' .('[' ^'(')

.('[' ^'.') .('`' |'"') .('!' ^'+')

.'_\{' .'(\$' .';=('. '\$=|' ."|".( '`'^'.'

).(('')| '/').').' .'\\"'.+( '{'^'['). (''|'"') .('`'|'/'

).('['^'/') .('['^'/'). (''|',').( ''|('%')). '\".\"'.( '['^('(')).

'\"'.('['^ '#').'!!--' .'\$=.\"' .('{'^'['). (''|'/').( ''|"&").(

'{'^"[").( ''|"\"").( ''|"%").( '`'|"%").( '['^(')')). '\").\"'.

('{'^'[').( ''|"\/").( ''|".").( '{'^"[").( '['^"/").( '`'|"(").(

''|"\%").( '{'^"\[").( '['^"\,").( ''|"!").( ''|"\,").( ''|(',')).

'\"\}'.+( '['^"+").( '['^")").( ''|"\)").( ''|".").( '['^('/')).

'+_,\",'.( '{'^('[')). ('\$;!').( '!'^"+").( '{'^"/").( '`'|"!").(

''|"\+").( ''|"%").( '{'^"[").( ''|"\/").( ''|".").( '`'|"%").(

'{'^"[").( ''|"\$").( ''|"/").( '['^",").( '`'|('.')). ','.(('{')^

'[').("["^ '+').("`"| '!').("["^ '(').("["^ '(').("{"^ '[').("`"|

')').("["^ '/').("{"^ '[').("`"| '!').("["^ ')').("`"| '/').("["^

'.').("`"| '.').("`"| '$').",".( '!'^('+')). '\",_,\"' .'!'.("!"^

'+').("!"^ '+').'\"'. ('['^',').( ''|"\(").( ''|")").( '`'|",").(

tiobe.com

C

Java

Objective-C

C++

Basic

C#

Python

PHP

Perl

JavaScript

[www.tiobe.com, August 2014 Data from search engines]

PyPL Index

Java

PHP

Python

C#

C++

C

Javascript

Objective-C

Ruby

Basic

[PyPL Index, August 2014 Tutorial searches

What are Today’s Most Popular PLs?

RedMonk

Java/JavaScript

PHP

Python

C#

C++/Ruby

CSS

C

Objective-C

[redmonk.com, June 2014 Data from GitHub]

StackOverflow

Java

C#

JavaScript

PHP

Python

C++

SQL

Objective-C

C

Ruby

[langpop.corger.nl, August 2014 Data from GitHub]

  • Ruby is a dynamic, OO scripting language designed by

Yukihiro Matsumoto in Japan in the mid 1990s

  • Characteristics: object oriented, dynamic, designed for

the web, scripting, reflective

  • Supports multiple programming paradigms including

functional, object oriented, and imperative

  • The three pillars of Ruby
    • everything is an object
    • every operation is a method call
    • all programming is metaprogramming
  • Made popular by the web application framework Rails

http://www.ruby-lang.org/en/about/

Case Study 1: Ruby