CSE 3342 Programming Languages

Fall 2009

Time: TuTh 11:00AM-12:20PM
Room: Junkins 205
Instructor: Dr. Yuhang Wang
Office: Room 800J in Expressway Tower
Office Phone: (214) 768-3716
Email: yuhangw@engr.smu.edu
Office Hours: Tu 9:30am-10:30am, Th 1pm-2pm in SIC 314 or 312, and by telephone or email. You can also schedule an appointment.

Grader: Sudheer Chelluboina (chsudheer291985@gmail.com)

Syllabus

Announcements

09/03/2009: Homework 1 assigned. Also note the change to office hours on Thursdays.
09/10/2009: Homework 2 assigned.
09/17/2009: Homework 3 assigned.
09/24/2009: Homework 4 assigned.
10/01/2009: Homework 5 assigned. Midterm scheduled on 10/8/09.
10/08/2009: Homework 5 due date extended to October 15.
10/20/2009: Homework 6 assigned.
10/27/2009: Homework 7 assigned. Homework 7 due date extended to November 5.
11/05/2009: Homework 8 assigned.
11/12/2009: Homework 9 assigned.
11/19/2009: Homework 10 assigned.

Course Info


Textbook
  • K.C.Louden, Programming Languages, Principles and Practice, 2nd edition, Thomson Learning/Brooks-Cole, ISBN# 0-534-95341-7 (required)

  • Joseph Albahari, Ben Albahari, C# 3.0 in a Nutshell: A Desktop Quick Reference, 3rd edition, 2007, O’Reilly Media, ISBN# 10:0596527578 (recommended)

Topics Covered
  • History of programming languages
  • Regular languages and finite automata
  • Abstract and concrete syntax
    • Basic semantics
    • Strategies for defining semantics
    • Variables and scope
    • Evaluation order and lazy evaluation
    • Simple imperative and functional languages
  • Functional programming
    • ML, C#
  • Object-oriented programming
    • Java, C++, C#
  • Logic programming
    • Prolog
  • Scripting languages
    • Perl
  • Types and data abstraction
    • Type checking, type safety
    • Polymorphism (parametric and subtype)
    • Modules
    • Objects, higher order functions, and multi-methods
  • Language implementation
    • Lexical analysis
    • Parsing
    • Interpreters and compilers
    • Run-time data representation
    • Memory management (stacks, heaps, garbage collection)
Computing

Homework assignments will require the use of the following languages: C++, C#, ML, Java, Prolog and Perl. All of these are freely available on the internet. These languages (except C#) have been installed on the linux machines in the open lab area on the third floor of SIC. The students are enrouraged to install them on their own computers. See the Programming Language Resources section below for more information.


Schedule and lecture notes


Date Topic
Slides/notes
Suggested reading

08/27/2009

Course logistics, overview, history of programming languages
slides-8-27-2009
Louden Chapters 1 and 2
09/01/2009 Syntax I (Regular expressions, regular languages and finite automata)

slides-9-1-2009
Quiz_1 and 2_solutions

09/03/2009 Syntax II (Context-free grammars and parsing 1/2)
slides-9-3-2009
Quiz 3 solution
Louden Sections 4.3, 4.4, 4.5, 4.7
09/08/2009 Syntax III (Context-free grammars and parsing 2/2, Perl Intro)

slides-9-8-2009a
slides-9-8-2009b
Quiz 4 solution

Louden Sections 4.3, 4.4, 4.5, 4.7
perlintro, Perl data structures intro, Perl regular expressions quick start
09/10/2009 Scripting language: Regular expressions and complex data structures in Perl
slides-9-10-2009
perlintro, Perl data structures intro, Perl regular expressions quick start
09/15/2009 Scripting language: Complex Perl data structures, OO Perl, Perl modules
slides-9-15-2009
pb-upload.pl
animals.pl

09/17/2009 Basic semantics I (Variable, scope, overloading)
slides-9-17-2009
Louden Sections 5.1, 5.2, 5.3, 5.4
09/22/2009 Basic semantics II (Lvalues and Rvalues, allocation, pointers)
slides-9-22-2009
Louden Sections 5.5, 5.6, 5.7
09/24/2009 Functional Programming 1/3 (ML: Intro to SML, lists, Pattern matching)
slides-9-24-2009
Louden Sections 11.1,11.4; Harper Chapters 2-4, 9
09/29/2009 Functional Programming 2/3 (ML: higher order functions, Concrete datatypes)
slides-9-29-2009
Harper Chapter 3, Louden Sections 11.1-11.4
10/01/2009 Functional Programming 3/3 (ML: Polymorphism, Evaluation order)
slides-10-1-2009
Harper Chapters 8, 10; Louden Section 11.4.2, 11.5
10/06/2009 Introduction to C#
slides-10-6-2009
C# book Chapters 1,2,3
10/08/2009 Midterm Exam    
10/15/2009 Midterm review, Introduction to C# continued
slides-10-15-2009
C# book Chapters 1,2,3
10/20/2009 Advanced C# topics
slides-10-20-2009
C# book Chapter 4
10/22/2009 Advanced C# topics
slides-10-22-2009
C# book Chapter 4
10/27/2009 Simple Types, Type equivalence, type conversion
slides-10-27-2009
Louden Sections 6.1-6.7
10/29/2009 Static and Dynamic Type Checking, Polymorphic Type Checking
slides-10-29-2009
Louden Sections 6.8, 6.9
11/03/2009 Abstract Data Types
slides-11-3-2009
Louden Chapter 9
11/05/2009 Object Oriented Programming I (Class, objects, method, inheritance)
slides-11-5-2009
Louden Chapter 10
11/10/2009 Object Oriented Programming II (Static and dynamic binding, implementation)

slides-11-10-2009
V
irtualExample.java
t
est.cpp
test2.cpp

Louden Chapter 10
11/12/2009 Procedures & Parameters Passing
slides-11-12-2009
Louden Sections 8.1-8.3
11/17/2009 Procedure Activations I: Fully static environments, stack-based runtime environments
slides-11-17-2009
Louden Section 8.4
11/19/2009 Procedure Activations II: Fully dynamic environments, garbage collection
slides-11-19-2009
Louden Sections 8.4, 8.5
11/24/2009 Logic Programming I (Prolog: Intro)   Louden Sections 12.1-12.2 ; Introduction to Prolog (Tasmin Treasure-Jones and Paul Brna)
12/01/2009 Logic Programming II (Prolog: Resolution, unification, lists)   Louden Sections 12.3-12.4 ; Introduction to Prolog (Tasmin Treasure-Jones and Paul Brna)
12/03/2009 Logic Programming III (Prolog: Search strategy, cut)   Louden Sections 12.4-12.5 ; Introduction to Prolog (Tasmin Treasure-Jones and Paul Brna)
12/08/2009 Review    
TBD Final Exam    

Programming Language Resources


Homework and Project

Grading: Homework and mini projects (40%), Quizzes (5%), Midterm exam (25%), Final exam (30%).

Weekly homework assignments will be posted online. Homework will be due at the beginning of class on the due date, unless otherwise noted. Late homework (due before 5 pm) will receive a 25% penalty per day. In case of emergencies, please talk to me to make special arrangements. If you will be out of town for a non-emergency (such as an interview), you should turn in the assignment early, rather than late, to avoid a penalty.

There will also be several mini programming projects assigned together with homeworks. Every student is expected to compete it on his/her own. Copying code (please don't try to fool me by simply changing names of functions/variables in someone else's code) is prohibited and will result in zero credit.

Exams

There will be one midterm and one final exam.

Policies

Last Updated: 11/19/2009