CS315 - Programming Languages, Spring 2013
Objective
The objective of this course is to learn programming language design. We will look at various aspects of programming languages and discuss alternative designs and their tradeoffs. We will also look at various examples from different programming languages and thus increase our familiarity with a wide range of programming languages and tools. Importantly, this course will also teach you how to specify the syntax of programming languages and how to use tools (such as lex and yacc) to build syntax checkers for a programming language. If you like this course, you should consider taking the CS 416 Compiler Design course as a follow up.
Location and Times
Location: EB-101 (Engineering Building)
Times:
Section I: Tue 15:40pm-17:30pm and Fri 14:40pm-15:30pm
Section II: Tue 10:30am-12:20pm and Fri 9:30am-10:20am
First hour on Friday is the spare hour.
Office Hour: 10:40am-12:00pm, Fri, EA501
Course Material
Main Book: Robert W. Sebesta, Concepts of Programming Languages, Pearson (Tenth Edition)
Supplementary Book: Programming Language Pragmatics, Morgan Kaufmann (Third Edition)
This book has advanced topics covered in a
CD.
Grades
Quizzes: 15% - 5 quizes, 3% each (on Friday lectures)
-
Project: 20% - 2 sub-projects, 10% each
-
Final: 30% - There is a 30 limit on the final for passing the course
Note: The midterm is mandatory. Those who did not take the midterm and do not have a valid excuse (medical report or special permission) will get an FZ from the course. They can't take the final. There will be only one make-up exam, which can be taken only by those who have missed the midterm exam and have a valid excuse. There is no make-up for the final, as the final-retake can be used for that.
Homeworks
Important Dates
Project Groups: Sep 30th
Homework 1 - Announced Sep 28th, due Oct 30th
Project Part 1 - Announced Oct 12th, due Nov 30th
Homework 2
Midterm - Open books and notes
Project Part 2
Homework 3
Make-up - Open books and notes
Final - Open books and notes
Course Topics
Preliminaries, Syntax and Semantics
Describing Syntax and Semantics
Lexical and Syntax Analysis (Lex & Yacc, Antlr)
Names, Bindings, Type Checking, and Scopes
Data Types
Expressions and the Assignment Statement
Statement-Level Control Structures
Subprograms
Implementing Subprograms
Abstract Data Types
Support for Object-Oriented Programming
Concurrency
Exception Handling and Event Handling
Functional Programming Languages
Logic Programming Languages
Project
The project is done by groups of 3 students. The project has 2 sub-projects to it.
Part I: Language design and lexical analysis
Part II: Syntax analysis of the designed language
You can find your group number from here.
Course TAs and Graders
Syllabus
We will have 15 weeks of classes. Each week will have 2 lectures, where each lecture consists of 2x 50 minutes with a 10 minute break in between. One of the hours of the Friday lecture is our 'spare hour' and will be used rarely.
Week 1 (week of 16/09-20/09)
Week 2 (week of 23/09-27/09)
Context-free grammars, BNF, parse trees
Ambiguity, precedence, associativity, EBNF
Sebesta: Chapter 3.1, 3.2
Scott: Chapter 2.1.1., 2.1.2, 2.1.3
-
-
Week 3 (week of 30/09-04/10)
Lexing and parsing
Sebesta: Chapter 4.1, 4.2, 4.3, 4.4
Scott: Chapter 2.2.1, 2.2.2, 2.2.3, 2.3.1, 2.3.2
-
We'll have both hours on Friday
Week 4 (week of 07/10-11/10)
Week 5 (week of 14/10-18/10)
Week 6 (week of 21/10-25/10)
Week 7 (week of 28/10-01/11)
Week 8 (week of 04/11-08/11)
Week 9 (week of 11/11-15/11)
Week 10 (week of 18/11-22/11)
Week 11 (week of 25/11-29/11)
Week 12 (week of 02/12-06/12)
Week 13 (week of 09/12-13/12)
Concurrency, Threads and mutual exclusion
Concurrency, Conditional variables
Week 14 (week of 16/12-20/12)
Week 15 (week of 23/12-27/12)
Week 15.5 (week of 30/12)
Recap
No classes on Friday
Languages
Some suggestions for programming languages to get familiar with:
-
C++: A multi-paradigm language
Java: An object-oriented language
Matlab: A scientific computing language (note: GNU Octave is a Matlab clone)
Python: A general-purpose scripting language
bash: A Unix shell scripting language
Haskell: A purely functional language
Scala: An OO functional language that runs on the JVM
In my personal opinion, a CS student should be familiar with at least the following languages:
A statically typed general-purpose programming language, such as C, C++, Java,
C#
A dynamically typed scripting language, such as Python,
Perl,
Ruby
A shell scripting language, such as bash, csh, sh, etc.
Functional programming languages, such as Scala, Haskell, Scheme, etc. are perhaps not as commonly used in the industry, but they would broaden your perspective. Scientific languages, such as Matlab and R, would prove useful for research work. For the latter, I would suggest you look at Python's SciPy scientific computing package as well.
My favorite language? That would be the much hated C++.