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: Wed 8:40-10:30 and Fri 10:40-11:30
Office Hour: 9:30am-10:30am, 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)
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
Homework 1
Homework 2
Project Part 1
Midterm - Open books and notes
Wednesday, March 27th, 2013, 8:30am - 10:30am
LB-Z10: Akdemir - Kutlubay
EB101: Özbay - Yurdakul
Midwork
Project Part 2
Homework 3
Make-up - Open books and notes
Final - Open books and notes
Thursday, May 23rd, 2013, 9am-12am
EB-101: Akdemir - Kösterit
EB-102: Kurt - Yurdakul
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
Doğukan Çağatay (TA)
Fuat Basık (Grader)
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. The second hour of the Friday lecture is our 'spare hour' and will be used rarely.
Week 1 (week of Feb 4-8)
Week 2 (week of Feb 11-15)
Context-free grammars, BNF, parse trees
Ambiguity, precedence, associativity, EBNF
-
Week 3 (week of Feb 18-22)
Week 4 (week of Feb 25-Mar 4)
Week 5 (week of Mar 4-8)
Week 6 (week of Mar 11-15)
Data Types
No lectures on Friday
Week 7 (week of Mar 18-22)
Week 8 (week of Mar 25-29)
Week 9 (week of Apr 1-5)
Week 10 (week of Apr 8-12)
Week 11 (week of Apr 15-19)
Week 12 (week of Apr 22-26)
Exceptions (self-study)
Concurrency, Threads and mutual exclusion
Concurrency, Conditional variables
-
Week 13 (week of Apr 29-May 3)
Week 14 (week of May 6-May 10)
Week 15 (week of May 13-May 17)
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.
My favorite language? That would be the much hated C++ and lately, the D programming language.