User Tools

Site Tools


cs315

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)
    • Book slides are here.
  • Supplementary Book: Programming Language Pragmatics, Morgan Kaufmann (Third Edition)

Grades

  • Quizzes: 15% - 5 quizes, 3% each (on Friday lectures)
  • Homeworks: 15% - 3 homeworks, 5% each
  • Project: 20% - 2 sub-projects, 10% each
  • Midterm: 10%
  • Midwork: 10%
  • 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
    • announced: February 15th
    • due: Friday, March 8th, midnight.
  • Homework 2
    • announced March 10th
    • due Sunday April 7th, midnight.
  • Project Part 1
    • announced February 23rd
    • due Sunday, March 31st, midnight.
  • Midterm - Open books and notes
    • Wednesday, March 27th, 2013, 8:30am - 10:30am
    • LB-Z10: Akdemir - Kutlubay
      • School of Applied Languages (B Block)
    • EB101: Özbay - Yurdakul
      • Engineering Building (B Block)
  • Midwork
    • announced March 28th
    • due Friday April 12th, class time.
  • Project Part 2
    • announced April 3rd
    • due Wednesday, May 15th, midnight.
  • Homework 3
    • announced April 16th
    • due Sunday, May 5th, midnight.
  • Make-up - Open books and notes
    • May 10th, 10:40am-12:30pm
    • B109 - B Binası
  • 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)
    • Preliminaries, syntax, semantics
  • Week 2 (week of Feb 11-15)
    • Context-free grammars, BNF, parse trees
    • Ambiguity, precedence, associativity, EBNF
  • Week 3 (week of Feb 18-22)
    • Lexing and parsing, theory
  • 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)
    • Midterm
    • Statement-Level Control Structures (self study)
  • Week 9 (week of Apr 1-5)
  • Week 10 (week of Apr 8-12)
    • Implementing subprograms
    • Abstract data types (self-study)
  • Week 11 (week of Apr 15-19)
    • Object oriented programming
      • mostly implementation of late binding
    • No classes on Friday
  • 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)
    • Functional programming
  • Week 14 (week of May 6-May 10)
  • Week 15 (week of May 13-May 17)
    • Exceptions summary (focus on Java)
      • For those who did not see it in CS102

Languages

Some suggestions for programming languages to get familiar with:

  • C: A systems language
  • 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.

cs315.txt · Last modified: 2013/06/17 16:14 by bgedik

Page Tools