Comp Sci 321 — Programming Languages


Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due


Comp Sci 321 — Programming Languages 

1 Course Description Comp Sci 321 introduces the concepts behind some key elements of common programming languages. We will implement a series of interpreters that nail down the precise details of how various aspects of programming languages behave, as well as explore other implications of treating programs as data. The class involves a significant hands-on programming component; you will implement a number of interpreters and other meta-programs yourself. 

2 Course Staff Instructor Vincent St-Amour Email: [email protected] Teaching Assistant Lukas Lazarek Email: [email protected] Peer Mentors Charles Bugayer, Claire Pare, Dawson Ren, Jada King, Jenna Kopp, Perry Benyella, Sophie Chang, and Willy Almonte 

3 Prerequisites • Comp Sci 111 and Comp Sci 211 and Comp Sci 214 • Comfort with structural recursion and functional programming 

4 Communication Channels In this class, we will rely on a variety of communication channels, each serving a different purpose.

4.1 Lectures Lectures will be synchronous and in person. We will make a best effort attempt at recording them. The recordings will be available from Canvas under the "Panopto" tab. Please see the recording policy at the end of this document. We expect you to come to lecture and participate. To ensure the health and safety of our community, DO NOT come to lecture if you have reason to believe you may be sick with COVID-19 (or anything else, really). Please watch the recordings instead and contact the instructor. Please see the COVID-19-related policies at the end of this document. 1 Questions I love questions! Keep ’em coming. During lecture, please ask questions in one of two ways: • Raise your hand and ask verbally. • If you prefer to ask anonymously and/or textually, reply to the Piazza (see below) post of the current lecture. A member of the course staff will then ask your question in your stead

4.2 Piazza We will use Piazza for discussion, Q&A, and announcements. You can find the class’s Piazza instance here: https://piazza.com/northwestern/spring2023/compsci321 We expect you to subscribe to the 321 Piazza board ASAP and monitor it regularly. Piazza should be the first place you go when you have a question. The course staff will monitor Piazza (as will many of your fellow students), which makes it the best option for getting answers quickly. Your fellow students may also benefit from the discussion. Any questions about the specifics of your solutions must be marked as private, however. For questions that require longer discussions/explanations, please attend office hours (see below) instead. If all else fails or for sensitive matters, send the instructor an email, either for discussion or to schedule an appointment. 

4.3 Canvas We will use Canvas to distribute materials, assignments, and feedback. All assignments will also be submitted via Canvas. We expect you to check Canvas regularly. Please do not use Canvas messages/comments to communicate with us; they are very easy to miss. Please use Piazza instead. 

4.4 Office Hours We will hold a combination of online and in-person office hours, circumstances permitting. We will maintain an up-to-date schedule (with locations) on the "Office Hours" page on Canvas. We will monitor attendance patterns and adjust the schedule to the best of our ability to limit crowding. Online office hours will be held using the gather.town platform. The room we will use is at: https://gather.town/b2MpRuLY0KjOjpQA/Comp-Sci-321-Office-Hours See the "Office Hours" page on Canvas for the password to the room. To ensure we can help students in a first-come first-served order, and to help us group up people with similar questions, we ask that you sign up on this form when you arrive to office hours, or when you have a follow-up question: https://forms.gle/domqFAcQiVKmSH8q9 You can look at the state of the queue to give you an idea of how close you are to being next in line: https://tinyurl.com/krdbradw Expectations Office hours are a great place to get advice and assistance on all aspects of the class (and even CS in general!) In particular, they are not limited to debugging assistance; conceptual questions are welcome too! Keep in mind, however, that our course staff is here to help you learn, not to give you solutions or to solve problems for you. An important part of the learning process is learning to figure things out and solve problems on your own; having members of the course staff do that for you would be doing you a disservice! This means you should expect our course staff to give you advice and strategies or point you to relevant resources (e.g., documentation, slides, videos), but not to hold your hand (so to speak) while you work 2 through problems. This will be especially true later in the quarter as assignments get more challenging and office hours get busier; to make sure everyone can get help, they won’t have time to do that. To get the most out of office hours, come prepared. Please come with specific questions or issues: i.e., not "I don’t know what to do." or "Where do I start?". And be ready to tell us what you have tried to resolve them: e.g., you wrote some test cases to narrow down where a bug could be, you’ve added some printing to understand what your code was doing. This will make it much easier for our course staff to figure out what’s going on, and they’ll be grateful. Ultimately, though, none of us are psychic: it’s absolutely possible there may be an issue with your code which we cannot figure out. The person who is in the best position to understand it is the person who wrote the code and has been staring at it for hours: i.e., you. Our job is to give you the tools you need to get to that understanding. 

5 Software 321 is a programming-heavy class, both in lecture and in assignments. We will be using the plai dialect of Racket (and others) that comes with the Racket environment. You will need to install version 8.8 from: racket-lang.org Older versions you may already have installed may not work for this class. 

5.1 Development Environment The DrRacket IDE (which comes with Racket, and which you may have used in 111 and/or 214) has the most complete PLAI integration of any environment; that’s the one I encourage you to use, and the one we’ll use in lecture. If you’re an Emacs user, I recommend Greg Hendershott’s excellent Racket mode; that’s what I usually use outside lectures. If you’re already comfortable with other development environments, you can try searching for Racket plug-ins for it. I’ve heard VS Code has a good one (Magic Racket). I’m not directly familiar with any of them, though, so caveat emptor. You’re welcome to use alternative environments if you wish, but neither I nor the course staff will be able to offer you support. You’ll be on your own. 

5.2 Hardware By defauly, we assume that you will be using your personal computer to work on assignments. If need be, you should also have physical access to the Wilkinson Lab, as well as login access to the computers there. If you cannot access these computers, please reset your password at: https://selfserv.eecs.northwestern.edu/temp_password/ If that does not work, please contact [email protected]. Similarly, contact root if you do not have physical access to the labs. 

6 Textbook We will loosely be following: Programming Languages: Application and Interpretation (First Edition) by Shriram Krishnamurthi Available for free online: http://cs.brown.edu/~sk/Publications/Books/ProgLangs/2007-04-26/ plai-2007-04-26.pdf The course itself should be self-contained, but the textbook may still be useful as a source of alternate explanations.

7 Assessment This class uses a non-traditional form of assessment: it eschews percentages and weighted averages in favor of concrete milestones and mostly-qualitative feedback. This is likely quite different from what you have seen in most of your classes; please read the following carefully. 

7.1 Homeworks This class will feature eight homework assignments. Homeworks will be posted on Canvas, and will also be submitted on Canvas. All homework assignments are individual. Homeworks will be due on Thursdays at 11:59pm Chicago time. Homework submissions will be evaluated via automated testing, and you will receive feedback regarding where yours fell short. Each submission will earn one of three possible outcomes: got it (3 on Canvas), on the way (1 on Canvas), or not yet (0 on Canvas);1 homework handouts will specify the criteria needed to achieve each outcome. Our eight assignments will be grouped by level of challenge as follows: • Warmup: homework 0 • Basic: homeworks 1, 2, 3, and 7 • Advanced: homeworks 4, 5, and 6 Final grades will be determined by how many assignments in each category you complete correctly; details in section 7.2. Resubmissions Making mistakes and correcting them is a natural part of the learning process. An outcome of on the way or not yet is NOT a failure: it just means you still have things to learn from this assignment. Our assignments are intentionally challenging in order to maximize your learning; it’s perfectly normal to not get all of them entirely correct on the first try. To give you the opportunity to incorporate our feedback and get credit for your improved learning, we will allow you to resubmit each programming assignment up to two times: one and two weeks after the initial deadline,2 respectively. When determining final grades, we will use the best of the three outcomes your submissions have achieved. Resubmissions are optional: if you’re happy about your first submission, you can skip the second and/or the third. After each deadline, we will give you feedback on your submissions, provided they were made in good faith. By good faith, we mean a submission that represents a genuine, if possibly incomplete or incorrect, attempt at a solution. A non-exhaustive list of submissions which would not be in good faith would include: an empty file, unmodified or barely modified code we wrote in lecture, or code that is unrelated to the homework. On the other hand, solutions with serious bugs, or with only part of the desired functionality would still be considered in good faith: struggling is perfectly fine, but not trying is not. This will be evaluated manually on a case-by-case basis. To be clear: the goal of this requirement is not to punish you, but rather to help you by providing some structure and scaffolding. Three submissions per assignment is a lot of rope, so to speak, and carries a genuine risk of putting off work and falling irreversibly behind (with the expected results); we’ve seen it happen. Think of this requirement as a guard-rail, to stop your metaphorical car from going off a cliff. 1This 0-1-3 system is directly inspired by the "three points for a win" system used in soccer. And just like its use there incentivizes teams to score more goals, its use here incentivizes you to give assignments your best shot. 2The last few deadlines of the quarter may deviate from that pattern; see the schedule later in this document. 4 Late Policy Late submissions will not be accepted, and the 11:59pm cutoff will be strictly enforced. The resubmission policy above will serve as our late policy: if your submission is not ready by the first deadline, no worries, just submit to the second. Barring extreme circumstances, we will not grant ad-hoc extensions or accomodations. If you do end up in a situation that would warrant additional flexibility, you must contact your dean of students3 and have them contact me. They will help you coordinate extensions and accomodations across all your classes, which will ensure you get the support you need across the board, not just in this class. 

7.2 Final Grades Final grades will be determined as follows. For each level of challenge (Warmup, Basic, and Advanced), add up the scores your submissions to homeworks at that level have earned (3 for got it, 1 for on the way, and 0 for not yet). Then go down the following table: your final grade is on the first row for which all of your sums match or exceed the target. Warmup (/3) Basic (/12) Advanced (/9) A 1 12 9 A- 1 10 7 B+ 1 9 5 B 1 10 4 B- 1 9 4 C+ 1 7 2 C 1 8 1 C- 1 7 1 D 1 6 1 F 0 0 0 For example, consider a hypothetical student whose submissions earned an on the way on homework 0 (warmup), got it on homeworks 1, 2, and 7 (basic), on the way on homework 3 (basic), got it on homework 4 and on the way on homework 5, but did not attempt homework 6. They would have a total of 1 for warmup assignments, 10 for basic assignments, and 4 for advanced assignments. Looking at the table, this corresponds to a B-; this would be their final grade. 

7.3 Why this system? This assessment system carries many benefits to you as a student. • Learning and grades align. Learning is our true goal here; grades are (at best) a distraction. But given the impact grades can (unfortunately) have beyond the classroom, ignoring them altogether may not be an option for everyone. As a compromise, this system ties grades directly to concrete achievements and milestones in your learning, rather than on an amorphous pool of fungible points of assorted provenances. • You are in control. You decide what grade you aim for, and the expectations you’ll need to meet for that goal are stated up front and transparently. Grades are determined solely by your achievements; no cutoffs, curves, or other such nonsense. No more "hoping" for a grade, and no more surprises when letter grades come: you can always tell exactly how things are going, and know what you need to do it you want to change it. 3 Joe Holtgreive ([email protected]) for McCormick students, Liz Fekete Trubey ([email protected]) for Weinberg students, and others for students in other schools. 5 

• High standards, low stakes. You’re all super smart. Yes, that means you too. You all have the potential to learn a lot in this class and grow as computer scientists. To inspire you to learn as much as you can, we will hold you to high standards; one doesn’t learn much by being consistently meh. At the same time, we recognize that high standards can carry a lot of pressure; which is why we’re also including mechanisms to lower stakes whenever possible (see next item). 

• There is room for mistakes. Making mistakes is part of the learning process, and you should get credit for learning from them. Resubmissions give you an opportunity to do so. Moreover, some slack is built-in to the grading standards to allow for small slips.

• Flexibility built-in. Life happens; we recognize that. But not all students feel comfortable asking for flexibility when necessary, either as a matter of personality or of upbringing. For this reason, "hiding" flexibility behind explicit requests is not equitable. Instead, this system comes with built-in flexibility—i.e., resubmissions—with no questions asked and no need to ask for it. That way everyone benefits, regardless of comfort level. Caveats That being said, this is a large class–which introduces issues of scale and equity—and we’re limited by the length of the term—which introduces issues of scheduling. This means we’ve unfortunately had to make some compromises when designing our assessment strategy. In an ideal world, we would assess your learning directly using mechanisms like oral exams and code walkthroughs, with infinite retries and no hard deadlines. But we are not in an ideal world, so we’re forced to assess your learning indirectly through your work using automated testing: i.e., a mechanism geared towards efficiency. This approach, while sadly necessary in our context, may not reflect your learning 100% accurately. Therefore, it is your responsibility to make sure the work you submit is as close a reflection of your actual learning as possible, so we can get the best picture we can of where you’re at as a student. And in turn, so you can get as much recognition as possible for your learning. Concretely, this means being thorough in your testing to avoid silly mistakes, and taking full advantage of our feedback when working on resubmissions. 

8 Academic Integrity 

The trust employers, colleagues, and the public put in a Northwestern degree is built on the premise that our grades are an accurate reflection of student learning and effort. Any attempt at subverting the relationship between learning and grades is a threat to this hard-earned trust and, left unaddressed, hurts all Northwestern students. As such, we take any attempts at violating academic integrity very seriously. In this class, we expect all students to know, understand, and abide by the McCormick Academic Integrity policy,4 as well as the course-specific policies below. Failure to abide by these policies is a serious offense which carries serious consequences. Fundamentally, anything you turn in for this class must be your own individual work, and be the product of your own thinking and reflection. There are two main ways in which your work may fall short of this expectation: accessing unauthorized sources and engaging in excessive collaboration. 

8.1 Unauthorized Sources Sources which you are allowed to use while working on assignments: 

• Materials posted to this course’s Canvas or Piazza this quarter. 

• Interactions with members of the course staff, be they in office hours, on Piazza, etc. 

• Feedback you receive from us on your work, for example in homework grading reports. 

• That’s it. In contrast, sources which you are not allowed to use or even consult while taking this class: 

• Submissions or work in progress from other students, past or present, in full or in part. This includes test cases; those are part of submissions. 

• Solutions or solution fragments you may find online or elsewhere. 

• Course materials from previous quarters, regardless of how you obtained them. 

• Outside tutors or "work-for-hire" services. 

• Code generation tools (AI-based or otherwise), such as Github CoPilot, ChatGPT, etc. 

• This list is not exhaustive; ask the instructor before using any source not explicitly listed above. Using, or even having access to, unauthorized sources constitutes a violation of this class’s academic integrity policy, regardless of the extent to which the source was actually used, or even if it was used at all. Similarly sharing, posting, or otherwise making available your own solutions (in full or in part) or any course materials (homeworks, exams, solutions, test cases, etc.) is also a violation of our academic integrity policy. This extends even after the quarter ends; course material remains private information which you may not share or reproduce. 

8.2 Excessive Collaboration Collaboration is a good thing, and something you’ll be expected to do in the workplace. However, we also need to ensure that every student has a solid foundation, which will allow them to be effective and productive collaborators throughout their career. For this reason, students must tread very carefully when collaborating in this class, to ensure they do not (accidentally or willfully) cross the line into excessive collaboration, with all the negative effects on learning this implies. When working with current or former students in this class, you are limited to arm’s-length collaboration. When collaborating at arm’s length: 

• You may not read, write, look at, record, or in any way transcribe solution elements from someone else. In turn, your collaborator may not read, dictate, or otherwise share elements from their own (or anyone else’s) solution with you, nor can they directly read, write, or look at your own solution either. 

• You may not have your own solution on your screen or otherwise in your field of vision while collaborating, and neither must your collaborator. 

• You must cite any collaborators whose ideas affected your work, and explain the effect the collaboration had on your solution. Bear in mind, however, that citing a collaboration does not absolve you from the aforementioned limits on arm’s-length collaboration. To avoid getting close to the line, we strongly recommend you keep any discussions with current or former students either at a conceptual level, or about non-graded aspects of the class (e.g., examples from course materials). You are of course always welcome to seek help from any member of the course staff on assignments; the above limitations do not apply to such interactions. As always when in doubt, ask the instructor before doing something you’re not sure about. 

8.3 Suspected Violations 

Any suspected violation will be reported to the McCormick Office of the Dean. The Dean will conduct an investigation to determine whether a violation did take place or not, which will involve meeting with you. Should you find yourself in this situation, be forthright and honest; lying or withholding information from the Dean is a further offense, and can make a bad situation much worse. 

9 Welcoming Environment I consider this classroom to be a place where you will be treated with respect. I welcome all students, and expect all of you to do the same. Together, we can create an environment where everyone feels welcome and can engage fully in our community. Each student has something of value to contribute, especially in engineering disciplines where empathy, communication, and teamwork elevate our contributions to society (and lack thereof can lead to disaster). Individual differences can deepen our understanding of one another, the world around us, and our lifelong role as engineers. (Credit: Adapted from statements by the ASEE and Prof. Emma DeCosta) 

10 Miscellaneous Statements The registrar has a lot of things they want me to tell you. 

10.1 Accessibility Statement Northwestern University is committed to providing the most accessible learning environment as possible for students with disabilities. Should you anticipate or experience disability-related barriers in the academic setting, please contact AccessibleNU to move forward with the university’s established accommodation process (e: [email protected]; p: 847-467-5530). If you already have established accommodations with AccessibleNU, please let me know as soon as possible, preferably within the first two weeks of the term, so we can work together to implement your disability accommodations. Disability information, including academic accommodations, is confidential under the Family Educational Rights and Privacy Act. 

11 Tentative Schedule Dates and content are subject to change. Any changes will be announced on Piazza. Date Homeworks Lecture Readings Thu 3/30 0 out Intro §1, §2 Tue 4/4 Variables and Binding §3 Thu 4/6 0 due, 1 out Parsing and Functions §4 Tue 4/11 2 out Deferred Substitution §5 Thu 4/13 1 due Higher-Order Functions §6 Tue 4/18 3 out Compilation, Recursion I §9 Thu 4/20 2 due Recursion II, State I §10, §12, §13 Tue 4/25 4 out State II §13 Thu 4/27 3 due Control I §18, §19 Tue 5/2 5 out Control II §18, §19 Thu 5/4 4 due Garbage Collection: Intro §21 Tue 5/9 Garbage Collection: Mark-and-Sweep I Thu 5/11 5 due Garbage Collection: Mark-and-Sweep II Tue 5/16 6 out Garbage Collection: Copying, Types: Intro §24 Thu 5/18 Types: Typing Rules §26 Tue 5/23 Types: Typechecking §26 Thu 5/25 6 due, 7 out Types: Extensions §25, §28 Tue 5/30 Pragmatics I Thu 6/1 7 due Pragmatics II Thu 6/8 6 3rd try, 7 2nd try due 10

发表评论

电子邮件地址不会被公开。 必填项已用*标注