Programming Language (CS 550)
Assignments and Solutions
- Course Description
Covers basic concepts of the design and implementation of programming languages,
including data representation and types, functions, sequence control,
environments, block structure, subroutines and coroutines, storage management.
Emphasizes language features and implementation, not mastery of any particular
This is a core course required by all graduate Computer Science students and
is an elective for graduate Software Engineering students.
The course is available to other students with sufficient programming
experience (see prerequisites) who have an interest in programming languages
(e.g. Information Systems, Computer Engineering, etc.).
- Course Themes
- Evaluation and implementation of of programming languages
- Tools for describing and analyzing languages, including syntax,
semantics, and pragmatics
- Tools to design new languages
- Programming Paradigms (imperative, functional, logic,
- Implementation of programming languages
- Course Objectives
- Be able to compare and evaluate different programming languages and
implement different programming constructs and features
(e.g. variables, loops, procedures, dynamic memory).
- Be able to formally specify the syntax and semantics of programming
- Be able to write a parser and a scanner.
- Be able to write a translator to convert from one language to
- Be able to describe the semantics of and implement an interpreter and
compiler for a simple programming language.
- Be comfortable with the major programming paradigms and be able to use
at least one language from each paradigm.
- Course Benefits
- Easier to express algorithmic ideas
- Better able to formally express concepts
- Improved ability to select appropriate languages
- Easier to learn new languages
- Understand the significance and impact of language choices and
- Able to design new languages (little languages, interface
Assumes familiarity with the basics of logic (predicate calculus),
recursion and induction, data structures, automata, and grammars.
All students should be proficient with at least one object-oriented
programming language (e.g. java, C++) - inheritance, polymorphism,
and should have seen at least two different programming languages.
- Jeremy Johnson
Office: University Crossings 139
e-mail: jjohnson AT cs DOT drexel DOT edu
office hours: M 3-4, T 3-4 and 7-8 (online), additional hours by appointment.
- LC Meng and Gabe Schwartz
Office: University Crossings 147
e-mail: lm433 AT drexel DOT edu and gbs25 AT drexel DOT edu
office hours: M 7-8 (online), W 8-9 (online), R 1-3 and R 4-6 (office and online).
- Meeting Time
- Thursday 6:30-9:30 in Univ. Crossings 153 and online.
The online and in class versions
of the course will be identical (in class lectures will be recorded and posted
on webct and use of online discussions will be required by everyone).
- Course Discussion Groups
- BbVista will be used for class discussion and announcements - check regularly
Please use this list for questions and discussions related to the course.
If you know the answer to someone's question, please feel free to jump in,
as long as well it is not an answer to a homework problem. I will moderate
the list so that frivolous mail and spam is not forwarded.
Michael L. Scott, Programming Language Pragmatics, 3rd Ed., Morgan Kaufmann Publishers, 2009.
- In addition to the official text book listed below, a variety of resources
for different programming languages will be made available and should be
consulted. Also all students must have access to the necessary compilers
and interpreters for the different languages discussed. All required
compilers/interpreters will be made available on the department of Computer
Science computers. Many, if not all, are publicaly available.
- Week 1: Parsing and Grammars (ch. 2)
- Week 2: Scanner and Parser Generation (ch. 2)
- Week 3: Attribute Grammars and Mini Language Interpreter (ch. 4)
- Week 4: Mini Language Compiler (ch. 14)
- Week 5: Compiler Optimization (ch. 14)
- Week 6: Functional Programming (ch. 10 and SICP)
- Week 7: Logic Programming and Query Languages (ch. 11 and SICP)
- Week 8: Object Oriented Programming (ch. 9 and SICP)
- Week 9: Lambda Calculus (ch. 10)
- Week 10: Data Types (ch. 7)
6 will be done in groups.
Students will be assigned to groups before Assignment 2 (4 students each -
members may come from either the in class or online sections).
Peer grading will be used for group participation and discussion groups
will be set up in BbLearnfor each group and all members are expected to
participate in the discussions and contribute to every assignment.
- Homework and participation (70%)
- Midterm (15%)
- Final Exam (15%)
- John R. Levine,
flex & bison,
O'Reilly & Associates. An
online copy of this book is available through Drexel's library
(safari). This is a rewrite of the older book on Lex and Yacc by
Levine, Mason, and Brown.
- John R. Levine, Tony Mason, Doug Brown,
Lex & Yacc,
2nd/updated edition (October 1992), O'Reilly & Associates. An
online copy of this book is available through Drexel's library
- Alfred V. Aho and Jeffrey D. Ullman,
Foundations of Computer Science - C Edition,
W. H. Freeman and Company, 1995.
- Kenneth Louden, Programming Languages: Principles and Practice, 2nd Ed., Thomson Brooks/Cole, 2003.
- list reference books here.
- Ken Louden's Web resources for hist text Programming Languages.
- [SICP] Abelson and Sussman, Structure and Interepretation of Computer Programs.
- Graphviz - Graph Visualization Software.
- CUP Reference Manula - Parser generator for Java.
- PLY - Python Lex-Yacc.
- MIT/GNU Scheme
- Lambda Calculus Tutorial
from Chris Barker at NYU.
(Last updated Sun. Mar. 21)
Look Here for Important Announcements
This list is tentative and may be modified at the instructor's discretion.
- Lecture 1: Grammars and Parsing (ch. 2 [Programming Language Syntax] and ch. 4 [semantic analysis])
- Lecture 2: Attribute Grammars and Mini Language Interpreter (ch. 4 [semantic analysis], ch. 6 [control flow], ch. 7 [subroutines])
- Lecture 3: Dynamic Memory Allocation and Garbage Collection (ch. 3 sec. 2 [Object lifetime and storage management] and ch. 7 sec. 7-8 [Pointers and recursive types and Lists])
- Lecture 4: Mini Language Compiler (ch. 5 [Target machine architecture], ch. 14 [Building a runnable program] and ch. 16 [Code improvement])
- Lecture 5: Scanner and Parser Generation (ch. 2 [Programming Language Syntax] and ch. 4 [semantic analysis])
- Lecture 6: Functional Programming and Operational Semantics of Scheme (ch. 10 of the text and ch. 3 and 4.1-3 of SICP)
- Lecture 7: Logic Programming and a Simple Query Language (ch. 11 [logic programming] and ch. 4 of SICP [query language])
- Lecture 9: Mini Language Semantics (ch. 10)
- Lecture 9: Lambda Calculus (ch. 10)
- Lecture 10: Object Oriented Programming and Implementation (ch. 9)
Programs and Worksheets
- Assignment 1 (parsing, parser generators and recursive data structures) - due Sun. April 14 [individual
- submit through BbLearn].
- Assignment 2 (mini
language interpreter with list processing) - due Sun. April 28 at 9am [group - submit through BbLearn].
- Assignment 3 (mini language compiler version 1) - due Sun. May 5 at 9am [group - submit through BbLearn].
- Midterm Exam
available Fri. May 3 at 9 am through by Thur. May 9 at 9:00am [individual take home exam with 5 hour time limit - submit through BbLearn].
- Assignment 4 (mini
language compiler version 2) - due Sun. May 19 at 9am [group - submit through BbLearn].
- Scheme Practice Assignment (not to be handed in)
- Assignment 5 (operational
semantics of scheme) - due Sun. May 26 at 9am [group - submit through BbLearn].
- Assignment 6 (functional mini language interpreter) - due Sun. June 2 at 9am [group - submit through BbLearn].
- Assignment 7 (logic
programming) - due Sun. June 9 at 9am [group - submit through BbLearn].
- Extra Credit Assignment (object oriented mini language interpreter) - due Sun. June 9 at 9pm [individual - submit through BbLearn].
- Peer Evaluation
due by Mon. June 10 at 9:00pm [individual evaluation of group - submit through BbLearn].
- Final Exam
available Sat. June 8 at 9 am through by Thur. June 13 at 9:00pm [individual take home exam with 5 hour time limit - submit through BbLearn].
Created: 3/30/07 [last updated 5/10/13] by jjohnson AT cs DOT drexel DOT edu
- Available for the class only through BbLearn.