COS 371: Programming Languages
Spring 2026
Basic Information
- Instructor: Jed Yang, CC221,
- Office hours: Tuesday 10:55–11:55 and Friday 13:40–14:40; or by appointment (instructions)
- Lectures: Mod D (MWF 12:30–13:40) in RC229
- Course website: https://mathcs.bethel.edu/yang/cos371.26s/
Resources
- Scheme (we will mostly be using R5RS in this course) resources:
- Dybvig's The Scheme Programming Language: 3rd edition (R5RS) | 4th edition (R6RS)
- Guidelines: style | grading (starting hw2)
- Language standards: R5RS | R6RS
- Introductory programming textbooks based on Scheme: SICP | HtDP
- Racket (a descendant of Scheme): guide | reference
Calendar
Daily/weekly schedule to be updated throughout the term; topics and exam dates are tentative and subject to change.
| Date | Read before class | Topics | Due next class |
|---|---|---|---|
| Unit 0: Introduction | |||
| Week 1 | |||
| 1. 02/02 M |
- | introduction | hw0: Logistics |
| 2. 02/04 W |
Programming paradigms What is Python? Python vs. others | programming languages | survey1 |
| 3. 02/06 F |
Dybvig 1; 2.1–2.2 [note]
Dybvig 3rd and 4th editions (both linked above) are based on R5RS and R6RS, respectively,
which are slightly different standards for Scheme.
We are using R5RS in DrRacket, and the interpreter project will be based on R5RS.
As such, I recommend reading 3rd ed.
However, if you prefer to learn newer features,
feel free to read 4th ed.,
as long as you keep in mind that some code will not work.
| Scheme basics | hw1: Scheme lab |
| Unit 1: Scheme | |||
| Week 2 | |||
| 4. 02/09 M |
Dybvig 2.3–2.6; Scheme style guide | Scheme lists | |
| 5. 02/11 W |
Dybvig 2.7–2.8; Scheme grading guide | list functions lab | hw2: Binary search trees |
| 6. 02/13 F |
Dybvig 3.2; Tail call optimization sections 1 and 3 [note]
Skipping
define-syntax from Dybvig 3.1. I did a demo in class, but will NOT test you on that. Feel free to read it if you'd like. | tail recursion | |
| Week 3 | |||
| 7. 02/16 M |
Dybvig 4 [note]
When encountering unfamiliar concepts that we skipped (e.g.,
define-syntax from Dybvig 3.1), feel free to look it up or ignore.
Do not use Do not use the shorthand forms for binding variables to procedures: | binding forms | hw3: Lazy lists |
| 8. 02/18 W |
Dybvig 5.1–5.4* [note]
Do not use iteration syntax
do and for-each. Instead, use recursion.
* Also 5.5 if reading 4th ed. | higher-order functions | hw4: First-class functions |
| 9. 02/20 F |
Dybvig 6.1–6.4 [note]
Do not worry too much about quasiquote.
Do not use | recursive substitution model | |
| Week 4 | |||
| 10. 02/23 M | recursive substitution model | hw5: Sieve of Eratosthenes | |
| 11. 02/25 W | (catch-up) | ||
| 12. 02/27 F | exam1 | ||
| Unit 2: C | |||
| Week 5 | |||
| 13. 03/02 M | C basics, assignment models | ||
| 14. 03/04 W | memory allocation | ||
| 15. 03/06 F | arrays and records | ||
| Week 6 | |||
| 16. 03/09 M | strings and multidimensional arrays | ||
| 17. 03/11 W | lambda calculus basics | ||
| 18. 03/13 F | programming with lambda calculus | ||
| Unit 3: Syntax | |||
| Week 7 | |||
| Week 8 | |||
| 19. 03/23 M | regular expressions | ||
| 20. 03/25 W | tokenization | ||
| 21. 03/27 F | tokenizer construction | ||
| Week 9 | |||
| 22. 03/30 M | context-free grammars | ||
| 23. 04/01 W | parsing | ||
| Week 10 | |||
| 24. 04/08 W | shift-reduce parsing | ||
| 25. 04/10 F | recursive descent parsing | ||
| Unit 4: Evaluation | |||
| Week 11 | |||
| 26. 04/13 M | (catch-up) | ||
| 27. 04/15 W | exam2 | ||
| 28. 04/17 F | side effects
- environment model: eval, let | ||
| Week 12 | |||
| 29. 04/20 M | environment model: apply, lambda | ||
| 30. 04/22 W | assignment forms: define, set! | ||
| 31. 04/24 F | binding forms: let*, letrec | ||
| Unit 5: Topics | |||
| Week 13 | |||
| 32. 04/27 M | scope | ||
| 33. 04/29 W | garbage collection: reference counting | ||
| 34. 05/01 F | garbage collection: tracing | ||
| Week 14 | |||
| 35. 05/04 M | parameter passing | ||
| 36. 05/06 W | continuations | ||
| 37. 05/08 F | exam3 | ||
| Week 15 | |||
| 38. 05/11 M | (catch-up) | ||
| 39. 05/13 W | (catch-up) | ||
| 40. 05/15 F | (wrap-up) | ||
Course Information
- Official course title: Organization of Programming Languages
- Official course description: Formal programming language specification using various grammars and the Backus–Naur Form. Data types and structures, control structures, and data flow of several programming languages, including interpreters and compilers. Introduction to parsing and lexical analysis.
- Prerequisites:
- COS277 (Software Development Fundamentals) with C- or higher; and
- MAT248 (Mathematics of Computer Science) with C- or higher.
- Textbooks:
Here are two optional books.
- R. Kent Dybvig, The Scheme programming language. This will be central to the course; I would have required it were it not freely available electronically (see resource section above).
- Michael Scott, Programming language pragmatics. This is an advanced textbook for a year-long course and, as such, it contains a wealth of information, mostly beyond the scope of this course. We'll read certain sections of it. You can read it online for free thanks to Bethel's subscription.
Overview
Programming Languages is a course designed to delve deeper into understanding the design and implementation of programming languages.Goals. The two main goals are
- to demystify how programming languages truly work under the hood and
- to introduce concepts and tools in language technology that is widely applicable to other endeavours of a programmer.
Programming languages are fascinating. They let programmers tell computers what to do. How does that work? It's not magic. Interpreters and compilers are programs after all! By writing an interpreter from scratch, we hope to demystify how programming languages are implemented.
Of course, most of us won't end up designing/implementing new programming languages. So how is this course relevant? Because the language technology concepts and tools we learn along the way are widely applicable to many other programming activities.
Topics. Our primary thrust is to implement a Scheme interpreter in C from scratch. Throughout, we will also spend time on various aspects of programming language design and structure. The list of topics is flexible. We will discuss topics as they arise naturally or when there is a lull in the project that gives us a chance for a diversion. Some topics may include:
- Regular expressions and tokenization
- Context-free grammars and parsing
- Tail recursion, memory management, variable scope, parameter passing
- Lambda calculus
Objectives. I will guide you to:
- Learn Scheme, a functional programming language.
- Think tail recursively.
- Implement a Scheme interpreter in C from scratch.
- Understand key features and tradeoffs that undergird programming languages you've seen.
- Commit to working, struggling, learning, laughing, and succeeding together as a team.
Grading
Your grade will be determined by a weighted arithmetic mean of various components with weights listed in the table on the right.| component | weight |
|---|---|
| Participation | ±3% |
| Homework and quizzes | 31% |
| Exams | 66% |
Note that there is no preset curve of how many of each letter grade will be given. If you all do A-level work, you will each get an A. As such, you are encouraged to help each other in the pursuit of perfection.
In many courses I intentionally make one exam harder than others, which gives me information (in a mathematical sense) in separating an A performance from an A- performance. Typically, I will let you know and adjust that exam's scores upward. What this means is that you should NOT care about how hard an exam is. If you do A-level work, you will get an A, regardless of the raw numerical score prior to adjustment.
Besides possibly adjusting scores upward for difficult exams, I also reserve the right to lower the grade cutoffs. Both of these help you. I will not hurt you by adjusting your exam scores downward or increasing the grade cutoffs.
Requirements
Whatever you do, work at it with all your heart, as working for the Lord, not for human masters, since you know that you will receive an inheritance from the Lord as a reward. It is the Lord Christ you are serving.I will be trying to make these verses true for me as I work with you throughout this course, and I hope that you will, too.- Colossians 3:23–24 NIV
Attendance and participation. I expect you to attend class. You may not notice me taking attendance during class meetings, but I will notice if you are not in class. Occasional absences will not impact your grade because what I look for is not mere attendance, but engagement and participation.
Indeed, coming to class is not just about showing up; it is also about being fully engaged in the learning experience. If you have a question, others in the class may also be wondering the same thing. So, please speak up and ask questions anytime you need to. Not only will you be helping yourself, but also you will be helping your peers. Attending office hours is another great opportunity to ask questions.
Be mindful of others. Refrain from using mobile phones or laptops for activities unrelated to the learning process. If you prefer to use laptops to take notes, please kindly sit in the back, as the screen may distract others. There is research that suggests taking notes by hand is better for long-term retention (P. A. Mueller and D. M. Oppenheimer, The pen is mightier than the keyboard, Psychological Science 25 (2014), 1159–1168).
Silence and put away mobile phones and do not use laptops for anything other than class-related activities.
It is my sincere hope that every one of you get all the points for attendance and participation.
Homework and Projects. There will be stand-alone homework, particularly at the beginning of the semester. There will be mileposts for the term project due regularly throughout the semester.
Assignments (homework and mileposts) are due at the beginning of the class period on the day it is due, unless otherwise stated.
You are given eight (8) late passes throughout the semester for homework and seven (7) late passes for project mileposts (but not the last project submission). Each late pass delays the due date of a single assignment by 24 hours, regardless of weekends and holidays. This allotment is to cover for legitimate reasons for tardiness that may arise, including asking for clarifications in class on the due date, disagreement with team members, accidentally forgetting to submit homework before class, illness, emergencies, or other situations beyond your control. No explanation for the tardiness is necessary or desired, but please do inform me (in person in class is fine) that you are submitting an assignment late. If you are out of late passes, work handed in late will receive zero credit. By default, you may not use more than one late pass for a single assignment. (But if you wish to do so, please discuss with me first. I may or may not grant the use of multiple late passes for a single assignment. Mainly, I do not want you to fall behind too much.) To be fair to everyone in the class, I will generally not grant additional extensions without the intervention of a doctor or dean. But if a genuine emergency situation arises, please talk to me.
Flipped learning. We will start the semester in the style of a traditional in-person course: come to class daily to learn from lectures and activities, then do homework after class. For the second half of the semester, when we are in full swing working on the term project, we may have some flipped learning days: you watch some lecture videos at home first and come to class prepared to work on the project. This setup affords you dedicated time with your team members to work together, and to have instant feedback and help from me. Your attendance (and engagement) during these work sessions are required.
Exams. There are several in-class midterm exams (see calendar for a tentative schedule). Subsequent exams will mainly focus on the material covered since the previous exam, but can include previous material too. (There is no final exam, but I reserve the right to replace the last midterm with a final exam.)
There are no make-up exams except in circumstances recognized by the instructor as beyond the control of the student. To receive this consideration, the instructor must be notified of the problem before the exam unless this is impossible, in which case as soon as possible.
Time outside of class. I expect a typical student to spend about two to three hours outside of class for each hour in class. Some students need to spend a bit more than that (which is okay). If you are spending more than 14 hours per week on this course outside of class time, please come talk to me so we can find ways to help you learn the material without spending so much time.
Illness. You should make every effort to attend class when you are healthy. If you become ill, for your well-being and the well-being of the rest of the class, you should not come to class. (Nor should you show up to my office with your germs!) Yes, this sounds like common sense, but it is tempting to try and power through as normal so as not to fall behind. If you become ill, or know that you will need to miss class for some reason, please contact me as soon as you are able, and we will work together to plan how you will keep up and/or make up any missed work.
Learning integrity.
Search me, O God, and know my heart;Collaborative work is an integral part of many successful ventures. As such, I expect that you should collaborate with your classmates a lot during your time in this course. However, it is important to understand that there is a big difference between thinking about and solving a problem as part of a group (which is good, both educationally and morally) and copying an answer or letting someone else copy your answer (which is bad, educationally and morally, and has punitive consequences).
Try me, and know my anxieties;
And see if there is any wicked way in me,
And lead me in the way everlasting.- Psalm 139:23–24 NKJV
In short, I trust you to maintain the utmost level of academic integrity in this course. Please do not break this trust; if you do, there will be repercussions. The formal policy below lays this out explicitly, and supplements Bethel's academic honesty policy.
Collaboration policy.
- You may collaborate on the homework assignments to the extent of formulating ideas as a group, but you may not collaborate in the actual writing of solutions/code (unless explicitly allowed in the instructions).
- In particular, you may not work from notes taken during collaborative sessions.
- You may not consult any materials from any previous offerings of this course or from any other similar course offered elsewhere unless explicitly permitted.
- You may not show your homework assignment code to other students, or to copy code from other students or other resources, including Internet sources or AI chatbots. Do not email each other code, and do not copy code over each other's shoulders. Any code you hand in for an assignment must represent your own work.
- You are required to completely understand any solution/code that you submit and, in case of any doubt, you must be prepared to orally explain your solution/code to me. If you have submitted a solution/code that you cannot verbally explain to me, then you have violated this policy.
Getting Help
If you need help there are multitude of resources you can use:- Yourself. If you're stuck on a problem or struggling with a concept from class, take a break and think about something else (e.g., your Hebrew assignment, the economics of Star Trek) for a few hours and then try a fresh start.
- Your classmates. You are each other's best resource: talking through
the course material with someone else who is also trying to master it is a
great way for you both to learn. (And don't discount the learning that you
will do while trying to explain to a classmate an idea covered during class
that you think you understand; I can't count the number of times that I've
discovered that I didn't really understand something until I tried to teach it
to someone.) The homework assignments are meant to challenge you, and figuring
some of them out together is a great approach.
- The instructor. Come to my office hours or email to make an appointment. Please read and follow instructions.
- The Moodle forum. Personal questions (e.g., regarding grades) should be elsewhere, but all other questions (e.g., course content, homework, logistics) should go here rather than sending me email. I will periodically respond on the forum, but also please help answer each other's questions! While I try to answer queries about homework within 24–48 hours, I cannot always make this timeline, and you should not rely on faster responses than this. Among other things, this means that you would be well advised to ask any questions of clarification earlier than the day before an assignment is due.
Bethel Policies
The following are policies that apply to every course at Bethel.Academic honesty policy. Violation of honesty standards can result in denial of credit (U or F) in a course, as well as dismissal from the university. Penalties are given at the discretion of the faculty member, and offenders will be referred to the associate provost of the College of Arts & Sciences. (See Bethel University's full policy on Academic Honesty in the catalog.)
Accessibility statement. Bethel University is committed to accessibility for students with disabilities and the Office of Accessibility Resources & Services (OARS) is a resource to ensure students experience access. Reasonable accommodations are approved after an interactive process with the student and OARS. The instructor will provide accommodations, but the student is required to initiate the process.
- Students with a documented disability may contact OARS to learn more about how to register for accommodations. Reasonable accommodations are approved after an interactive process with the student and OARS.
- Students registered with OARS are responsible for logging in to their AIM Accessibility Accommodation portal (via MyBethel) each term to request their Faculty Notification Letter of Accommodations. Accommodations cannot be applied prior to the faculty’s receipt of the letter.
- OARS recommends the student and faculty discuss how accommodations may apply in the specific course. Accommodations cannot modify essential requirements or fundamentally alter the nature of the course. Consultation with OARS may be necessary to clarify reasonable accommodations based on the course. If there are any questions or concerns, connect with OARS at accessibility-services@bethel.edu or 651.638.6833.
Multilingual learners support.
- If you are a multilingual student and believe you would benefit from support for this course, please see your instructor. Possible supports include access to lecture notes, additional time for completing assignments and/or tests, vocabulary lists, use of translation dictionaries, additional time for writing assignments.
- When you notify your instructor, s/he may refer you to the AESC office (HC324) so that you can meet with an academic counselor. The academic counselor will help determine the supports that could contribute to your success in the course and will notify your instructor to suggest these supports be made available to you.
- In addition to specific supports for this course, one-on-one writing support is available for multilingual students. Stop by HC324 or schedule an appointment for Multilingual Support. More information on multilingual support is available.
Concerns and appeals. If you have any concerns regarding the course, your grades, or the instructor, see the instructor first. If needed, see Bethel's academic appeals policy.