COMS W4115
Programming Languages and Translators
Lecture 1: September 9, 2009
1. Teaching Staff
Instructor
- Professor Alfred V. Aho
- http://www1.cs.columbia.edu/~aho
- aho@cs.columbia.edu
- 513 Computer Science Building
- Office hours: Mondays and Wednesdays 3:00-4:00pm
- Course webpage: http://www1.cs.columbia.edu/~aho/cs4115
-
- Course bulletin board: https://courseworks.columbia.edu
- Lectures on Mondays and Wednesdays, 4:10-5:25, 833 Mudd
TAs
- Sharadh Bhaskharan
- sb3053@columbia.edu
- Office hours: Wednesdays 11:00-1:00
- TA Room: 122 Mudd
- Peter Lu
- yl2505@columbia.edu
- Office hours: Tuesdays 12:30-2:30pm
- TA Room: 122 Mudd
- Jyotsna Sebe
- js3624@columbia.edu
- Office hours: Mondays 2:45-3:45pm, Fridays 2:00-3:00pm
- TA Room: 122 Mudd
- Sinan Xiao
- sx2117@columbia.edu
- Office hours: Thursdays 10:00am-noon
- TA Room: 122 Mudd
2. Course Objectives
- You will learn about the syntactic and semantic elements of modern programming languages.
- You will learn the important algorithms used by compilers to
translate high-level source languages into machine and other
target languages.
- You will learn about imperative, object-oriented, functional, logic, scripting languages, and parallel languages.
- A highlight of this course is a semester-long programming
project in which you will work in a small team to create
and implement an innovative little language of your own design.
- You will learn good software engineering practices.
- The concepts, techniques, and tools that you will learn in this
course have broad application to many areas of computer science
and software development outside of programming
languages and compilers.
3. Course Syllabus
- Kinds of programming languages
- Overview of compiling
- Lexical analysis
- Syntax analysis
- Tools for constructing compilers
- Syntax-directed translation
- Semantic analysis
- Run-time organization
- Intermediate code generation
- Code generation
- Parallel and concurrent programming languages
4. Textbooks and References
- The course text is
- Alfred V. Aho, Monica Lam, Ravi Sethi, and Jeffrey D. Ullman
- Compilers: Principles, Techniques, and Tools, Second Edition
- Pearson Addison-Wesley, 2007
- Other good references are
- Andrew W. Appel
- Modern Compiler Implementation in Java, second edition
- Cambridge University Press, 2002
- Keith D. Cooper and Linda Torczon
- Engineering a Compiler
- Morgan Kaufmann, 2004
- Steven S. Muchnick
- Advanced Compiler Design and Implementation
- Morgan Kaufmann, 1997
- Michael L. Scott
- Programming Language Pragmatics, Second Edition
- Morgan Kaufman, 2006
- Robert W. Sebesta
- Concepts of Programming Languages, Eighth Edition
- Addison-Wesley, 2008
-
Also see Professor Stephen Edwards' PLT website. Well worth a look!
5. Course Requirements, Grading, and Late Policy
- Homework assignments (10% of final grade): must be done individually
- Midterm (20% of final grade): Wednesday, October 14, 2009
- Final (30% of final grade): Monday, December 14, 2009
- Course project (40% of final grade): project has team and individual components
- All assignments can be handed in one week after they are due for 50% credit.
6. Project Requirements
- Students will work in teams of five to create and implement
an innovative little language of their own design during the course of the semester.
- Project deliverable due dates:
- Oct 7: Language white paper.
See
http://java.sun.com/docs/overviews/java/java-overview-1.html
for a sample white paper on Java.
- Nov 4: Language tutorial and reference manual.
- Dec 7 and 9: Project presentations in class.
- Dec 21 - 23: Final project report due at project demo.
- Dec 21 - 23: Project demos.
- Start to form project teams of five right away. Elect a
- Project manager
- Language guru
- System architect
- System integrator
- Verification and validation person
- Help forming teams will be given Wednesday, Sep 16.
7. Programming Languages
- A programming language is a notation for specifying computational tasks that a person can understand
and a computer can execute.
- Every programming language has a syntax and a semantics.
- The syntax specifies how a concept is expressed.
- The syntax is often defined using a (context-free) grammar.
- statement ->
while ( expression ) statement
- The semantics specifies what the concept means or does.
- Semantics can be specified operationally, axiomatically or denotationally.
- "Time flies like an arrow."
8. Kinds of Languages
- Imperative language
- Specifies how a computation is to be done.
- Examples: C, C++, C#, Fortran, Java
- Declarative language
- Specifies what computation is to be done.
- Examples: Haskell, ML, Prolog
- von Neumann language
- One whose computational model is based on the von Neumann architecture.
- Basic means of computation is through the modification of variables (computing
via side effects).
- Statements influence subsequent computations by changing the value of memory;
- Examples: C, C++, C#, Fortran, Java
- Object-oriented language
- Program consists of interacting objects.
- Each object has its own internal state and executable functions (methods)
to manage that state.
- Object-oriented programming is based on encapsulation, modularity,
polymorphism, and inheritance.
- Examples: C++, C#, Java, OCaml, Simula 67, Smalltalk
- Scripting language
- An interpreted language with high-level operators for
"gluing together" computations.
- Examples: AWK, Perl, Python, Ruby
- Functional language
- One whose computational model is based on the recursive definition of functions.
- Computational model based on expressions that have values.
- Examples: Haskell, Lisp, ML.
- Parallel language
- One that allows a computation to run concurrently on multiple processors.
- Parallel programming models
- Libraries: POSIX threads, MPI
- Languages: Ada, Cilk, OpenCL
- Research projects: Chapel, X10
9. Influential Languages
- 1950s: assembler, Cobol, Fortran, Lisp
- 1960s: Algol60, Basic, Simula67
- 1970s: C, ML, scripting languages, application-specific languages
- See
TIOBE Index
for their list of this month's 100 most popular programming languages.
- TIOBE top ten for September 2009: Java, C, C++, PHP, VB, Python, C#, Perl,
JavaScript, Ruby
10. Language Design Issues
- Intended class of applications
- Programming model
- Readability
- Writability
- Performance
- Scalability
- Reliability
11. Reading Assignment
aho@cs.columbia.edu