CSCI170
Analysis of Programming Languages
Instructor
Frederic Green, Mathematics/Computer Science, BP334, ext. 7410. E-mail: fgreen (at)
clarku (dot) edu.
Office Hours:
Tuesdays 2:30-4:30 and Thursdays 1:15-4:30pm. Or by appointment.
Teaching Assistants with Lab hours
Alan Ruan (ARuan at-sign clarku dot edu).
Consultation Hours: Mondays and Wednesdays 7:30-9:30.
Text
Programming Languages, Principles and Practice (Third Edition) by Kenneth C. Louden and Kenneth A. Lambert (Cengage Learning, 2012).
Purchase or rent here.
Meeting Times
Lectures: Tuesdays and Thursdays, 10:25-11:40am, BP326;
Labs: Tuesdays at 12-1:15pm, BP310.
Course Goals
To understand the principles underlying the design and implementation of programming languages. We will study the principles involved in specifying language syntax and semantics, drawing on specific examples from various programming languages, look at some of the basic principles of compilers and interpreters, and examine the main alternative approaches to programming language design (imperative, functional, object-oriented, etc.). We will pay particular attention to the imperative and
functional approach, since practical experience will be gained by writing part of a Scheme interpreter in C.
Course Work
Tests will consist of attendance/participation (10%), 4 or 5 half-hour
quizzes (20%) and a final (30%), comprising 60% of the final grade. The remaining 40% will be determined by assignments, which include a couple
of small programming assignments and a substantial
project (see below).
Time committement: You should expect to spend an average of 13 hours per week in this course outside of class. This includes 1.25 hours in lab,
about 2 hours reading and 10 hours on assignments or the project,
all of which may include help sessions with TAs and professor.
The Project
Writing an interpreter might sound like a difficult task, but (at least for Scheme) it is really not that hard if you think about it the right way (and that's why we're here!). You will be given the basic input/output procedures on which the interpreter can be built. The project will be broken down into a set of five smaller, manageable assignments (detailed information will be given shortly). Grades are based on performance (does it work?), style, design and documentation.
Concerning Late Work
Your best course is to hand in work when it is due (reasonable excuses such as illness are acceptable provided they can be documented). Graded assignments are due at the stated time on the assignment. If you find you just cannot finish an assignment on time, please hand in whatever you have done anyway. I would rather see evidence that you are trying than nothing at all.
If you are having trouble with any assignment, please do not hesitate to discuss it with me, either in person or via e-mail.
For project assignments I am more flexible.
The project is designed to be self-paced to an extent, so the "deadlines" for project assignments are not strictly enforced. The price you pay for not submitting project assignments in on time is that you will get feedback on them later than if you did, and this diminishes your chances of completing the project. The project grade is
ultimately based how far you got with it, and how well it is coded (modularity, efficiency, documentation).
Some Words
on Academic Honesty
Work that you hand in as your own is expected to be done by you and no
one else. All work in this course is to be conducted in accordance with
the Clark
University
Academic Integrity Policy. All instances of plagiarism are,
following
University policy, reported directly to the Dean of Academic Advising.
Course Syllabus
In part to facilitate the project, in the beginning we will start
by diving into an introduction to C, which will anticipate (informally) many of the issues we
will encounter later on in greater generality. Likewise, we will follow that with a quick
introduction to Scheme that will serve the same purpose for functional languages.
Readings are indicated in brackets. Sections/chapters
in Louden are preceded by an "L" or "AS" (Abelson and Sussman, for more in-depth readings on Scheme). Some topics (denoted "Lecture") are only
partially covered in the readings or not at all.
Quiz dates to be announced (with at least one week's notice).
This syllabus is approximate and subject to change.
Date(s) | Topic | Reading |
1/14 | Introduction and Overview | L1 |
1/16 - 1/21 | Introduction to C | C Notes, Lecture, L11.3 |
1/21 - 1/28 | Scheme | L3.1-3.2, AS Chapter 1 |
1/30 - 2/6 | Syntax and Parsing | L6 |
2/11 - 2/18 | Syntax, Basic Semantics | L6, L7 |
2/20 | Basic Semantics | L7 |
2/25 | Basic Semantics | L7 |
2/27 | Scheme internal representation | Lecture, L3.2,
AS 2.2.1-2.2.2 |
3/3 - 3/5 | SPRING BREAK | |
3/10 | Data Types | L8 |
3/12 | Data Types | |
3/17 | Control | L8 |
3/19 | Control | L10 |
3/24 - 4/2 | Object-Oriented Programming | L5 |
4/7 | Scheme Interpretation | Lecture |
4/9 | Formal Semantics | L13 |
4/14 - 4/16 | More Functional Programming | L3.3 - 3.4 |
4/21 - 4/23 | Logic Programming | L12 |
4/23 | Review (last day of course) | |
Other Useful Links
- A useful document on C For Java Programmers.
- A few simple C programs.
- How to create projects with Netbeans (Windows/Linux) or Xcode (Mac).
- A few simple Scheme functions
(as discussed in lecture).
- A few graded exercises to
get you started in Scheme. Try these on your own. If you get stuck,
or to see if you came up with a better solution than I did,
the answers are here.
- NetBeans IDE, our platform of choice for C development for Windows or Linux; for Mac, I recommend
Xcode.
- Some instructions for configuring Netbeans
here.
- A nice interactive C tutorial:
learn-c.org (very nice
interactive interface, with a working run-time environment that works
when last I checked; great resource!).
- If you want a book: Learn C the Hard Way (ironically titled, perhaps).
- The code for exercises 7.26 and
7.28 in the text.
- Schemers.org.
- A Scheme Tutorial.
- A classic "intro" to Computer Science based on Scheme:
Structure and Interpretation of Computer Programs
(the whole book!). Here it is in
pdf.
- The original paper
on LISP (John McCarthy, 1960, re-typeset in LaTeX)!
And a modern "translation" by Paul Graham.
- Racket, an extension of Scheme that includes a good environment ("Dr. Racket", a.k.a. "Dr. Scheme") for basic Scheme development; previously known as "PLT Scheme".
- PVTS, a basic Scheme interpreter, written in Java, that has some really nice visual features.
- Some experiments with higher order functions in Scheme.
- Two simple examples of closures in Scheme.
- Some simple examples of using
function pointers in C.
- Some Prolog and
ML examples.
- For a few laughs, esoteric
programming languages.
Back to Fred Green's home page.