Scheme Interpreter | CS 61A Spring 2026
Eval calls apply,
which just calls eval again!
When does it all end?
Introduction
Important submission note : For full credit,<br>- Submit with Phase 1 and Phase 2 complete by (worth 1 pt). -->
Submit with Phase 1 complete by Thursday 04/16 (worth 0.5 pt).
Submit with Phase 1 and Phase 2 complete by Thursday 04/23 (worth 0.5 pt).
Submit with all phases complete by Wednesday 04/29 .
Try to attempt the problems and run their ok tests in order, as some later problems will depend<br>on earlier problems in their implementation.
The entire project can be completed with a partner.
You can get 1 EC point by submitting the entire project by<br>Tuesday 04/28 .
In this project, you will use Python to implement an interpreter for a subset of<br>the Scheme language. The subset of the language used in this project is<br>described in the functional programming section of Composing Programs, as<br>well as this language specification and built-in procedure reference.
To learn more about Scheme, you can read<br>Structure and Interpretation of Computer Programs online for<br>free. Examples from Chapters 1 and 2 are included as test cases for this<br>project. Language features from Chapters 3, 4, and 5 are not part of this<br>project, but of course you are welcome to extend your interpreter to implement<br>more of the language.
Download starter files
You can download all of the project code as a zip archive.
Files you will edit:
scheme_eval_apply.py: the recursive evaluator for Scheme expressions
scheme_forms.py: Python functions for evaluating special forms in Scheme (such as define, lambda, and, cond, etc.)
scheme_classes.py: Python classes that describe Scheme expressions
questions.scm: Scheme procedures for you to implement
The rest of the files in the project:
link.py: defines the Link class, nil, and map_link
scheme.py: the interpreter read-eval-print loop or REPL (the user interface to the interpreter)
scheme_builtins.py: built-in Scheme procedures
scheme_reader.py: the reader (parser) for Scheme expressions
scheme_tokens.py: the tokenizer for Scheme input
scheme_utils.py: functions for inspecting Scheme expressions
buffer.py: a utility class for the scheme reader
ucb.py: utility functions for use in 61A projects
tests.scm: a collection of test cases written in Scheme
ok: the autograder
tests: a directory of tests used by ok
mytests.rst: a file where you can add your own tests
Oral Exams
We will be conducting Project Oral Exams for every student in the week following the due date of the project. Project code will be worth 50% of the assignment and the Oral Exam will be worth the remaining 50%.
For Scheme, Gradescope submission of the project will account for 15 points, Oral Exam will be worth 15 points, and submitting early will get you +1 extra credit point.
Oral Exams will test for your understanding on the project and the code that you've written. They will be a short, in-person meeting with a staff member where you will be asked a few comprehension questions. You will be assigned a score out of 15 corresponding to the number of questions you answered correctly. More information regarding the Oral Exams and Sign ups will be released closer to the due date.
Logistics
Remember that you can earn an additional bonus point by submitting the<br>project at least 24 hours before the deadline.<br>-->
The project is worth 15 points.<br>14 points are for correctness,<br>0.5 points for submitting Phase 1 by the first checkpoint date, and 0.5 points for submitting Phases 1 & 2 by the second checkpoint date.
You can get 1 EC point for submitting the entire project by Tuesday 04/28.
You will turn in the following files:
scheme_eval_apply.py
scheme_forms.py
scheme_classes.py
questions.scm
You do not need to modify or turn in any other files to complete the<br>project. To submit the project, submit the required files to the appropriate Gradescope assignment.
You may not use artificial intelligence tools to help you with this project<br>or reference solutions found on the internet.
For the functions that we ask you to complete, there may be some<br>initial code that we provide. If you would rather not use that code,<br>feel free to delete it and start from scratch. You may also add new<br>function definitions as you see fit.
However, please do not modify any other functions or edit any files not<br>listed above . Doing so may result in your code failing our autograder tests.<br>Also, please do not change any function signatures (names, argument order, or<br>number of arguments).
Throughout this project, you should be testing the correctness of your code.<br>It is good practice to test often, so that it is easy to isolate any problems.<br>However, you should not be testing too often, to allow yourself time to<br>think through problems.
We have provided an autograder called ok to help you<br>with testing your code and tracking your progress. The first time you run the<br>autograder, you will be asked to log in with your Ok...