Policies
Academic Integrity
In Brief
The spirit of this policy is that actions which shortcut the learning process are forbidden while actions which promote learning are encouraged. Studying lecture materials together, for example, provides an additional avenue for learning and is encouraged. But using a solution you did not develop yourself is prohibited because it avoids the learning process entirely. It is your responsibility to know what is permissible and what is not. If you have any questions or doubts, please contact your instructor.
In Detail
Academic honesty is required in all your work. Under no circumstances may you hand in work done with or by someone else under your own name. Discussing ideas and approaches to problems with others on a general level is encouraged, but you should never share your solutions with anyone else nor allow others to share solutions with you. You may not examine solutions belonging to someone else, nor may you let anyone else look at or make a copy of your solutions. This includes, but is not limited to, obtaining solutions from students who previously took the course, solutions that can be found online, or solutions provided by generative AI (e.g. ChatGPT or Copilot).
In your solutions, you are permitted to include material which was distributed in class, material which is found in the course textbook, and material developed by or with an assigned partner. In these cases, you should always include detailed comments indicating on which parts of the assignment you received help and what your sources were.
When working on tests, exams, or similar assessments, you are not permitted to communicate with anyone about the exam during the entire examination period (even if you have already submitted your work). You are not permitted to use any resources to complete the exam other than those explicitly permitted by course policy. (For instance, you may not look at the course website during the exam unless explicitly permitted by the instructor when the exam is distributed.)
Failure to abide by these rules constitutes academic dishonesty and will lead to a hearing of the College Judiciary Committee. According to the Faculty Handbook:
Because plagiarism is considered to be so serious a transgression, it is the opinion of the faculty that for the first offense, failure in the course and, as appropriate, suspension for a semester or deprivation of the degree in that year is suitable; for a second offense, the penalty should normally be expulsion.
This policy applies to all course work, including but not limited to code, written solutions (e.g. proofs, analyses, reports, etc.), exams, and so on. This is not meant to be an enumeration of all possible violations; students are responsible for seeking clarification if there is any doubt about the level of permissible communication.
Please ask your instructor if you have any questions about what is acceptable in this course.
Grading
This course uses a standards-based grading model rather than a more traditional weighted-average grading model. You are probably familiar with weighted-average grading, in which you earn some number of points on each assessment (lab assignment, test, etc.) and your point totals on those assessments are weighted and averaged in some way that produces your final grade (e.g. scoring at least 93% of the total points earns an A grade). The purpose of standards-based grading is to move our focus from earning as many points as possible to learning course material. The work you do in this course will be largely the same as in any other Computer Science course — completing lab assignments and taking written tests — but you will be given opportunities to correct your mistakes and, consequentially, your work will be evaluated rigorously.
Grades
Each assignment or test question you submit in this course will correspond to one of the standards described in the sections below. There are 22 standards in this course. Each piece of work you submit will yield one of the following results:
- If your work meets the requirements and expectations of the relevant standard, then you are marked as fully qualified (QQ) in that standard. Work which contains inconsequential errors can earn this grade.
- If your work largely meets the requirements and expectations of the relevant standard but contains an important error, then you are marked as partially qualified (PQ) for that standard. This grade is earned for work is mostly sufficient but requires some correction.
- If your work does not meet the requirements and expectations of the relevant standard, then you are marked as pending progress (PP) for that standard. This grade is earned for work which contains multiple significant errors or which lacks important content.
Your mark in a standard can only be replaced by a higher mark given for later work. That is: if your first submission partially qualifies (PQ) for a standard and your second submission is pending progress (PP) for that standard, then your mark in that standard remains PQ. Once you have qualified (QQ) in a standard, you no longer need to submit work for it.
Your final grade in this course is determined by the number of standards in which you fully qualified together with the number of pairs of standards in which you partially qualified. (That is: partially qualified standards count as half of a fully qualified standard.) The letter grade you earn in the course is determined by the following table.
Qualifications | Letter Grade |
---|---|
22 | A+ |
20-21 | A |
19 | A- |
18 | B+ |
17 | B |
16 | B- |
15 | C+ |
14 | C |
13 | C- |
12 | D+ |
11 | D |
10 | D- |
<10 | F |
For example, a student who fully qualifies in 17 standards and partially qualfies in 3 standards would earn a B+ (since 17+3×½ is at least 18 but less than 19). A student who fully qualifies in 14 standards and partially qualifies in the remaining 7 standards would earn a B.
Standards
The standards for the course are separated into three general categories: preparatory standards, compiler development standards, and examination standards. Each standard is identified by a two character abbreviation for reference.
Warmup Standards
Our work in this course will be completed in OCaml, a functional programming language with a variety of features we will find helpful. The early part of this course will be focused on learning the OCaml programming language. We will also have a syllabus quiz at the beginning of the semester to ensure everyone understands this syllabus as well as the examination process.
- Demonstrate an understanding of the course syllabus.
- Write programs to solve simple problems in OCaml.
- Write programs to apply data structures and higher-order functions in OCaml.
Compiler Development Standards
The majority of the lab work you will complete in this class will be on your compiler project. In this project, which spans the entire semester, you will add a variety of features to construct a working compiler for a series of small languages. Each lab assignment corresponds to one or two standards.
- Implement a compiler for a language which supports arithmetic operations.
- Extend the compiler to a language which includes booleans using a runtime binary representation.
- Extend the compiler to a language which provides run-time error checking and output via C function calls.
- Extend the compiler to provide compile-time error checking of function declarations and calls.
- Extend the compiler to a language which supports user-declared functions and function calls.
- Extend the compiler to a language which supports data structures via dynamic allocation.
- Extend the compiler to support the declaration and first-classs membership of higher-order functions.
- Extend the compiler to support partial application and higher-order function calls.
- Implement a mark-compact garbage collector.
- Extend the compiler to integrate and correctly call the garbage collector from within a generated program’s runtime.
- Extend the compiler to a language which provides multi-process parallelism.
- Extend the compiler to perform tail-call optimization.
- Implement a left-recursive parser for a simple functional language.
Examination Standards
This course will also include brief bi-weekly tests in which you will demonstrate conceptual familiarity with the course material. Please see the Written Examinations section below for more information about these assessments.
- Demonstrate an ability to manually trace, understand, and debug simple OCaml programs.
- Demonstrate an understanding of abstract syntax, variable scoping, and stack allocation.
- Demonstrate an understanding of run-time binary representations and the compilation of function calls.
- Demonstrate an understanding of heap allocation and the compilation of functions.
- Demonstrate an understanding of the compilation of first-class functions and partial application.
- Demonstrate an understanding of garbage collection and heap memory management.
Coursework
Coursework in this course consists of two general categories: lab assignments and written examinations. Both types of coursework have multiple opportunities for qualification.
Lab Assignments
The first two lab assignments in this course are designed to assist you in learning the OCaml programming language. These lab assignments are completed individually by each student. They should be completed by the time you start working on your compiler.
The remaining lab assignments in this course involve working on your semester-long compiler project. You may work on this project by yourself or with a partner. The compiler assignments are sequential: each relies upon having completed the last as you progressively develop code in a single repository. Do not fall behind in your compiler assignments as it would have unfortunate ramifications throughout the entire semester.
Lab assignments are due at 11:59pm on the nights listed in the lab write-up (typically Tuesday or Friday). To mitigate the aforementioned ramifications, however, these due dates are advisory. There is no direct penalty for missing a lab assignment due date. However, lab assignments will only receive credit if submitted on or before the last day of classes. If you fall behind on your compiler assignments, you may find it impossible to catch up before the end of the semester and this will have a significant impact on your final grade.
Submission
Because the due date is so flexible, you will need to take additional action to submit your compiler assignments. Pushing your code is not enough. Submitting your assignment requires a few additional terminal commands that are described at the end of the lab assignment write-ups.
Once your submitted lab assignments are evaluated, you will receive feedback in the form of a grade (PP, PQ, or QQ) and written comments. If your work did not qualify for the related standard, you may correct your work and submit it again. There is no limit to the number of times you may submit your work, but it may take a few days before your instructor provides feedback for a particular submission. Be sure to evaluate your lab work carefully before submitting it in order to avoid waiting unnecessarily for graded feedback.
Written Examinations
This course features bi-weekly tests in which you will demonstrate your conceptual understanding of the compilation techniques we discuss in this course. Each of the tests appearing on the course schedule corresponds to one of the examination standards listed above. These tests will be administered at the beginning of that week’s lab session.
The mid-term exam and the final exam are comprehensive, summary examinations which will provide additional opportunities to qualify for the examination standards. These exams have questions on the same content as the bi-weekly tests. The mid-term exam will be scheduled for the entirety of that week’s lab session; the final exam will be scheduled as typical for Swarthmore courses. Note that there are no new standards or content on these summary exams. Students who have fully qualified in all current examination standards before a summary exam have no need to complete it.
Exceptional Situations
If a medical condition or other unforeseen emergency has interfered with your ability to complete your coursework, please contact your Dean’s office and your instructor. Faculty will work with your class Dean in order to determine appropriate accommodations for your situation. If only your work in this course has been impacted, you may instead contact only your instructor to determine an appropriate course of action.
Academic Accommodations
If you believe you need accommodations for a disability or a chronic medical condition, please visit the Student Disability Services website for details about the accommodations process. Since accommodations require early planning and are not retroactive, contact Student Disability Services as soon as possible. You are also welcome to contact your instructor privately to discuss your academic needs. However, all disability-related accommodations must be arranged, in advance, through Student Disability Services.