This is the page for CSE130 (Summer Session II, 2015).
If you need assistance outside of lecture or discussion:
- Find us on Piazza;
- Contact us during office hours; or
- Stop by the labs during tutoring hours.
Course Schedule
Day | Material | Readings |
---|---|---|
08/03 | Lecture 1: Course overview, Syntax and grammars | SICP 1.1, 1.2 |
08/05 | Lecture 2: EBNF, Scheme primitives, Special forms | SICP 1.3 |
08/10 | Lecture 3: Iteration and tail calls, Block structure | SICP 2.1 |
08/12 | Lecture 4: Lists, Types, Higher-order procedures | SICP 2.2, 2.3, 2.4 |
08/17 | Lecture 5: Environment encapsulation, Fixed points, Dotted tails | SICP 2.5, 3.1, 3.2 |
08/19 | Lecture 6: Quoting, Tagged data | SICP 3.3, 4.1 |
08/24 | Lecture 7: Mutation, Environments, The interpreter | SICP 3.3, 4.1 |
08/26 | Lecture 8: Continuations, CPS | Dybvig 3.3, 3.4 |
08/31 | Lecture 9: Logical programming, Lambda calculus | SICP 3.5, 4.4 |
09/02 | Lecture 10: Review | |
09/04 | Final examination |
Written Assessments
Four written assessments will be handed out in class and due back by the next class.
- WA #1 - Physical copy turnin due by: Monday, August 17 at the start of lecture.
- WA #2 - Physical copy turnin due by: Wednesday, August 26 at the start of lecture.
- WA #3 - Physical copy turnin due by: Monday, August 31 at the start of lecture.
- WA #4 - Physical copy turnin due by: Wednesday, September 2 at the start of lecture.
A Scheme Interpreter
The main course project is writing a Scheme interpreter in Java. The task is broken down into several parts:
- Part One: A Scanner for Scheme Tokens - Write a scanner (also known as a lexical analyzer, or a tokenizer).
- Part Two: A Datum Parser - Write a parser for Scheme-style S-Expressions.
- Part Three: A Turing-Complete Evaluator - Complete your Scheme interpreter by following the process described in SICP 4.1.
Compiling and Testing Your Interpreter
-
Make a project directory; e.g.,
interpreter
. -
Download the starter code file:
schemeProjectStarter.zip
.Move the extracted
org
directory into yourinterpreter
directory. -
Download the tester jar:
tester.jar
and move it into yourinterpreter
directory.(You may view the test data directly, by extracting the contents of the jar file, if you would like.)
-
Build your interpreter directly with
javac
:$ mkdir classes $ javac -d classes -source 8 -target 8 `find org -name \*.java -print`
-
Build a jar file for your (compiled) interpreter:
$ jar cfe scheme.jar org.instructures.interp.SchemeEvaluator -C classes .
-
After you have built your
scheme.jar
you can run the tests.To run the tests on your scanner, use the
scan
option:$ java -jar tester.jar scheme.jar scan
The other options you can use are
parse
andeval
. -
An HTML report can built using the
--html
flag:$ java -jar tester.jar --html scheme.jar scan
-
To execute your program directly for just a single test file (that is, if you've extracted the contents of the
tester.jar
file first), you can use thescheme.jar
file as a classpath:$ cd testdata/run $ java -cp ../../scheme.jar org.instructures.interp.TokenScanner cps-product.scm
Meeting Times
Section: 845917 | Day | Time | Location |
---|---|---|---|
Lecture | Mon/Wed | 2:00–4:50pm | Center Hall 113 |
Discussion | Tue/Thu | 3:00–3:50pm | Center Hall 113 |
Final | Fri, 09/04 | 3:00–5:59pm | Center Hall 113 |