COMS W4115
Programming Languages and Translators
Lecture 1: January 23, 2008
1. Teaching Staff
2. Schedule
- Lectures: Mondays and Wednesdays, 4:10-5:25, 602 Hamilton
- Language white paper: Feb 27, 2008.
- Midterm: Wed, Mar 12, 2008
- Spring break: Mar 17-21, 2008
- Language tutorial: Mar 26, 2008.
- Language reference manual: Mar 26, 2008.
- Project presentations: Mon, Apr 28 and Wed, Apr 30
- Final: Mon, May 5, 2008 (last day of class)
- Final project reports due May 12-13, 2008
- Project demos: May 12-13, 2008
3. 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, and scripting 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.
4. 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
- Software verification tools
5. 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
- Keith D. Cooper and Linda Torczon
- Engineering a Compiler
- Morgan Kaufmann, 2004
- Andrew W. Appel
- Modern Compiler Implementation in Java, second edition
- Cambridge University Press, 2002
- Michael L. Scott
- Programming Language Pragmatics, Second Edition
- Morgan Kaufman, 2006
- Steven S. Muchnick
- Advanced Compiler Design and Implementation
- Morgan Kaufmann, 1997
-
Also see Professor Stephen Edwards' PLT website. Well worth a look!
6. Course Requirements, Grading, and Late Policy
- Homework assignments (10% of final grade): must be done individually
- Midterm (20% of final grade)
- Final (30% of final grade)
- 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.
7. 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 due dates and deliverables:
- Feb. 27: Language white paper.
See
http://java.sun.com/docs/overviews/java/java-overview-1.html
for a sample white paper on Java.
- Mar. 26: Language tutorial and reference manual.
- Apr 28 and 30: Project presentations in class.
- May 12-13: Final project report due at project demo.
- May 12-13: Project demos.
- Start to form project teams of five right away. Elect a
- Project manager
- Tools guru
- System architect
- System integrator
- Verification and validator
- Help forming teams will be given Wednesday, Jan 30.
8. 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 or denotationally.
- "Time flies like an arrow."
9. 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.
10. 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 Jan 2008 top ten: Java, C, VB, PHP, C++, Python, Perl, C#, Delphi, JavaScript
11. Reading Assignment
aho@cs.columbia.edu