Compilers and Interpreters
Fall, 2020 (3 credits, E)
Instructor
Office: Malone 337
Office hours: T/Th 1-3 pm EDT (see Piazza for Zoom URL)
Course Assistants
Andrew Rojas and Devin Hill (see Piazza for office hours and Zoom URLs)
Meeting
MW 12:00–1:15 pm EDT
Class meetings will be held virtually via Zoom. See Piazza for URL(s).
Textbook
Recommended: Cooper and Torczon, Engineering a Compiler (2nd Ed.), ISBN 9780120884780
Recommended: Levine, Flex and Bison, ISBN 9780596155971
Online Resources
Lecture notes, assignments, and public information about the course will be posted on the course website, https://jhucompilers.github.io/fall2020. You should check the course website frequently.
Piazza (announcements, discussion): https://piazza.com/jhu/fall2020/601428
Gradescope (assignment/exam submission and grading): https://www.gradescope.com
Videos will be posted on Blackboard: go to http://my.jhu.edu, log in, choose Education → Blackboard, choose EN.601.428 from courses, then choose Panopto
Course Information
- Introduction to compiler design, including lexical analysis, parsing, syntax-directed translation, symbol tables, runtime environments, and code generation and optimization. Students are required to write a compiler as a course project.
- Prerequisites
Intermediate Programming (EN.601.220)
Data Structures (EN.601.226)
Computer Systems Fundamentals (EN.601.229) - Elective
Course Goals
By the end of the course, you will
- Describe lexical structure using regular expressions and finite automata
- Implement lexical analyzers using ad-hoc techniques and lexical analyzer generators
- Describe syntactic structure using context-free grammars
- Design grammars to achieve desired semantic properties
- Design grammars suitable for top-down and bottom-up parsing techniques
- Implement parsers using ad-hoc techniques and parser generators
- Implement intermediate representations such as abstract syntax trees and control-flow graphs
- Use intermediate representations for interpretation
- Use intermediate representations for semantic analysis
- Use intermediate representations for code generation
- Optimize generated code for code size and run-time efficiency
This course will address the following Criterion 3 Student Outcomes:
Graduates of the program will have an ability to:
2) Design, implement, and evaluate a computing-based solution to meet a given set of computing requirements in the context of the programs discipline.
Course Topics
- Lexical analysis
- Parsing
- Intermediate representations
- Interpretation
- Semantic analysis and type checking
- Runtime environments
- Code generation
- Code optimization
Course Expectations & Grading
Class meetings will consist of lecture and discussion, interspersed with in-class activities.
Your course grade will be determined as follows:
- Programming assignments: 60%
- Exams: 40%
You have a total of 5 late days to use as needed for homework assignments throughout the course. Each 24 hour period following an assignment deadline is considered to be one late day: for example, if an assignment is due at 11pm on Friday, but you submit your assignment at 11:30pm on Friday, you have used one late day. If you are planning on using more than two late days on an assignment, please send a private message to the instructors on Piazza to let us know. Assignment submissions which exceed the maximum number of late days will (generally) not be considered for credit. Having said that, we understand that exceptional circumstances can arise. If you are in a situation where you think you may need additional late days, please notify your instructor.
Key Dates
The Schedule lists exam dates.
The Assignments page lists assignments and their due dates.
Assignments & Readings
The Schedule lists the topics and readings for each day.
The course’s Blackboard page (under Panopto) hosts the lecture videos.
Ethics
The strength of the university depends on academic and personal integrity. In this course, you must be honest and truthful, abiding by the Computer Science Academic Integrity Policy:
Cheating is wrong. Cheating hurts our community by undermining academic integrity, creating mistrust, and fostering unfair competition. The university will punish cheaters with failure on an assignment, failure in a course, permanent transcript notation, suspension, and/or expulsion. Offenses may be reported to medical, law or other professional or graduate schools when a cheater applies.
Violations can include cheating on exams, plagiarism, reuse of assignments without permission, improper use of the Internet and electronic devices, unauthorized collaboration, alteration of graded assignments, forgery and falsification, lying, facilitating academic dishonesty, and unfair competition. Ignorance of these rules is not an excuse.
Academic honesty is required in all work you submit to be graded. Except where the instructor specifies group work, you must solve all homework and programming assignments without the help of others. For example, you must not look at anyone else’s solutions (including program code) to your homework problems. However, you may discuss assignment specifications (not solutions) with others to be sure you understand what is required by the assignment.
If your instructor permits using fragments of source code from outside sources, such as your textbook or on-line resources, you must properly cite the source. Not citing it constitutes plagiarism. Similarly, your group projects must list everyone who participated.
Falsifying program output or results is prohibited.
Your instructor is free to override parts of this policy for particular assignments. To protect yourself: (1) Ask the instructor if you are not sure what is permissible. (2) Seek help from the instructor, TA or CAs, as you are always encouraged to do, rather than from other students. (3) Cite any questionable sources of help you may have received.
On every exam, you will sign the following pledge: “I agree to complete this exam without unauthorized assistance from any person, materials or device. [Signed and dated]”. Your course instructors will let you know where to find copies of old exams, if they are available.
Report any violations you witness to the instructor.
You can find more information about university misconduct policies on the web at these sites:
- For undergraduates: http://e-catalog.jhu.edu/undergrad-students/student-life-policies/
- For graduate students: http://e-catalog.jhu.edu/grad-students/graduate-specific-policies/
Classroom Climate
As your instructor, I am committed to creating a classroom environment that values the diversity of experiences and perspectives that all students bring. Everyone here has the right to be treated with dignity and respect. I believe fostering an inclusive climate is important because research and my experience show that students who interact with peers who are different from themselves learn new things and experience tangible educational outcomes. Please join me in creating a welcoming and vibrant classroom climate. Note that you should expect to be challenged intellectually by me, the TAs, and your peers, and at times this may feel uncomfortable. Indeed, it can be helpful to be pushed sometimes in order to learn and grow. But at no time in this learning process should someone be singled out or treated unequally on the basis of any seen or unseen part of their identity.
If you ever have concerns in this course about harassment, discrimination, or any unequal treatment, or if you seek accommodations or resources, I invite you to share directly with me or the TAs. I promise that we will take your communication seriously and to seek mutually acceptable resolutions and accommodations. Reporting will never impact your course grade. You may also share concerns with the department/center chair/head/director (Randal Burns, randal@cs.jhu.edu), the Director of Undergraduate Studies (Joanne Selinski, joanne@cs.jhu.edu), the Assistant Dean for Diversity and Inclusion (Darlene Saporu, dsaporu@jhu.edu), or the Office of Institutional Equity (oie@jhu.edu). In handling reports, people will protect your privacy as much as possible, but faculty and staff are required to officially report information for some cases (e.g. sexual harassment).
Family Accommodations Policy
You are welcome to bring a family member to class on occasional days when your responsibilities require it (for example, if emergency child care is unavailable, or for health needs of a relative). In fact, you may see my children in class on days when their school is closed. Please be sensitive to the classroom environment, and if your family member becomes uncomfortably disruptive, you may leave the classroom and return as needed.
University Policy on Incompletes
The university recognizes that the Fall 2020 semester is surrounded with uncertainty and many students may find themselves in unexpected situations where study is difficult if not impossible. Students who are confronted with extraordinary circumstances that interfere with their ability perform their academic work may request an incomplete grade from the instructor. While approval of such a request is not automatic, it is expected that faculty will make every effort to accommodate students dealing with illness in the family and other pandemic-related hardships. The instructor and student must establish a timetable for submitting the unfinished work with a final deadline no later than the end of the third week of the Spring 2021 semester (February 12, 2021). Exceptions to this deadline require a petition from the instructor to the student’s academic advising office by February 12, 2021. When entering an Incomplete grade in SIS, faculty must include a reversion grade which represents the grade the student will receive if s/he does not complete the missing work by the agreed-upon deadline.
Deadlines for Adding, Dropping and Withdrawing from Courses
Students may add a course up to September 11, 2020. They may drop courses up to October 12, 2020 provided they remain registered for a minimum of 12 credits. Between October 12 and November 13, 2020, a student may withdraw from a course with a W on their academic record. A record of the course will remain on the academic record with a W appearing in the grade column to indicate that the student registered and then withdrew from the course.
For more information on these and other academic policies, see https://e-catalogue.jhu.edu/engineering/full-time-residential-programs/undergraduate-policies/academic-policies/grading-policies/