Course Staff

Instructor

Kevin

Kevin Angstadt
Office: Rice 434
Office Hours: Mondays 15:00–16:00, Rice 314 (and by appointment)
Email: angstadt@virginia.edu

Teaching Assistants

Daniel Hoerauf

Daniel

Jay Sebastian

Jay

A.J. Varshneya

A.J.

Course Information

Spring 2017
Meets: TTh 12:30–13:45
Room: Olsson 011
Course Requirements:

Required Materials

Programming Language Pragmatics (4th Edition) by Michael L. Scott, Morgan Kaufmann, 2015. (available for ~$60 on Amazon [http://a.co/fXbR2pf])

(Additional readings will be provided on the course website, where appropriate)

Important Dates

Class Calendar (Google) Class Calendar (iCal)

Event/Action Date
First Class Meeting2017-01-18
PA1a Due2017-01-31
Last Day to Add2017-02-01
PA1b Due2017-02-02
Last Day to Drop (College)2017-02-02
PA1c Due2017-02-07
PA2 Due2017-02-14
Exam 12017-02-21
PA3 Due2017-02-26
Last Day to Drop (E-School)2017-03-01
No Class — Spring Recess2017-03-07
No Class — Spring Recess2017-03-09
PA4t Due2017-03-14
Last Day to Withdraw2017-03-15
PA4c Due2017-03-19
PA4 Due2017-03-28
Exam 22017-03-30
PA5t due2017-04-11
PA5c due2017-04-14
Exam 32017-04-27
Final Exam (No Exam, PA5 due)2017-05-06

Course Overview and Goals

From the course catalog: Presents the fundamental concepts of programming language design and implementation. Emphasizes language paradigms and implementation issues. Develops working programs in languages representing different language paradigms. Many programs oriented toward language implementation issues.

You wrote a program in Python. How does a computer execute it? As computer scientists, we use programming languages on an almost daily basis but rarely consider how the text we write is translated and executed by a computer. Additionally, our choice of language significantly influences the way in which we represent a problem; different programming languages admit different programming paradigms.

In previous computer science courses, you developed proficiency programming using imperative and object-oriented paradigms (most likely in Python and Java). This course will expose you to, and help you develop proficiency with, the functional programming paradigm. We will be using the Reason programming language, a dialect of the OCaml programming language developed by Facebook.

Next, we will study how programming languages are designed and implemented. We will discuss lexing, parsing, variable bindings, control flow, types, subtyping, operational semantics, and method invocations. While the development of practical skills is a key goal of this course, we will also discuss the underlying theory of these topics. Using this knowledge, students will implement an interpreter for the Classroom Object Oriented Language (Cool).

In the remaining time at the end of the semester, we will cover additional topics related to programming languages, such as automatic memory management, compilation, concurrency, and exceptions.

At the end of this course, you will be able to:

  1. Develop algorithms and manipulate data using functional programming paradigms.

  2. Identify and describe the stages of an interpreter.

  3. Interpret context-free grammars, typing rules, and operational semantics.

  4. Use common tools for generating lexers and parsers.

  5. Build a working interpreter for an object-oriented programming language.

  6. Paraphrase core issues and concepts in programming language design and implementation.

Course Schedule

As described in the course goals, topics in this course are split into three units. A rough ordering of topics is presented below, but is subject to change. The lectures page maintains a detailed description of topics covered so far in class.

  1. Programming Languages and Paradigms

    • Introduction to Programming Languages

    • Functional programming with Reason

    • Functional paradigm in other languages

    • Introduction to the Cool programming language

  2. Programming Language Design and Implementation

    • Lexing and parsing a program

    • Semantic analysis and type-checking

    • Interpreting an object-oriented program

  3. Additional Programming Language Issues and Concepts

    • Automatic memory management

    • Compiling code

    • Exceptions

    • Concurrency

Attendance

Students are expected to attend each class meeting. Absences will leave holes in your understanding of course concepts. If you must miss a class, you are expected to make up the material on your own time before the next class. You are welcome to attend office hours if you have specific questions about the material you missed, but you will not receive any help if you ask, "what did I miss?" in office hours.

I do my best to post resources from class online (slides, audio recordings, etc.), but I write a significant amount on the chalkboard.

Electronics Policy

Students may find having a laptop available in class beneficial. From time to time in class, we will look at code examples and solve tasks together. Having a laptop in class will allow you to gain more hands on experience. Students are expected to remain on task in class (no excessive web browsing, social media usage, etc.), as per the professionalism policy. If you have any concerns about this request, please contact me outside of class, and we will work together to find an appropriate solution.

Generally speaking, I encourage taking notes by hand. At least one recent study found that students who took notes longhand remembered more and had a deeper understanding of the material. Rather than using slides, I typically take notes on the board, which will help you keep up if you are taking notes by hand.

Grading

Final grades are based off of a cumulative point system. One point on an exam is equivalent to one point on a programming assignment. The grade breakdown will roughly be 44% exams, 48% programming assignments, and 8% reading quizzes. There is no curve in this course.

Your final grade will be calculated as follows. First, the percent of total points you received is calculated and truncated to one decimal point (i.e., not rounded). Then, this percentage is mapped to a letter grade.

Toggle Letter Grade Mapping

Letter Max Min
A+10097.5
A97.492.5
A-92.489.5
B+89.486.5
B86.482.5
B-82.479.5
C+79.476.5
C76.472.5
C-72.469.5
D+69.466.5
D66.462.5
D-62.460
F59.90

Note that there is no "rounding up" to receive a D-.

Exams

There will be three one-hour exams throughout the semester. There is no final exam. Content for the exams may come from lecture, readings, and programming assignments and is cumulative. Make-up exams will not be given for absences unless pre-approved by the instructor, a note from a medical professional is provided, or in extreme circumstances.

Reading Quizzes

Readings will be assigned on a class-by-class basis. There will be a short quiz associated with each reading assigned for class. The purpose of these quizzes is to help students retain information for quick recall while completing homework assignments and to help maintain a steady pace of material during class meetings.

Quizzes will be available online via Collab and must be completed prior to the start of each class meeting (except for exams or as otherwise announced). There is no limit on the number of times a student may take a reading quiz before the deadline. Excluding special circumstances, reading quizzes may not be taken after the deadline has passed. Two (2) points will be awarded for a perfect score, and one (1) point will be awarded for correctly answering three quarters of the questions correctly. In total, the final reading quiz grade will be roughly equivalent, points-wise, to one of the earlier programming assignments.

Programming Assignments

There will be a total of five (5) programming assignments during the semester. These exercises are intended to give you practice with and explore and concepts presented in class. Additionally, PA2-PA5 form a complete interpreter for Cool, the Classroom Object-Oriented Language.

Unless otherwise noted, all assignments are due by 11:50 PM on the day listed to be eligible for full credit. Assignments should be submitted using the course's automated grading server.

Late Assignments

Unless otherwise noted, assignments turned in x hours late (rounded up) will have their point value multiplied by 1 – (x/200). For example, if you turn in an assignment at 7:50 AM the next day (8 hours late), your grade for that assignment will be multiplied by 0.96.

Collaboration

PA1 must be completed individually.

For PA2-PA5, you may work either alone or in teams of two. Teamwork imposes burdens of communication and coordination, but has the benefits of more thoughtful designs, cleaner programs, and (sometimes) higher bandwidth. Team programming is also the norm in the professional world.

Students on a team are expected to participate equally in the effort and to be thoroughly familiar with all aspects of the joint work. Both members bear full responsibility for the completion of assignments. Partners turn in one solution for each Assignment; each member receives the same grade for the assignment. If a partnership is not going well, the teaching assistants will help to negotiate new partnerships. Teams may not be dissolved in the middle of an assignment without instructor permission.

You may discuss the assignments with your classmates, but you may not share code or written text. You may only submit work that you have personally written and understood.

Resources

You may consult your class notes and the assigned reading materials to help with your assignments. You may also reference web resources (please read below about citations). Note, however, that you may not submit a third party tool that performs the tasks specified in a given assignment or text that you have not written.

You should know that fairly sophisticated plagiarism detection software will be used on the assignments. For more details, see the Academic Integrity and Professionalism section.

Both the TAs and I will be available to answer questions during office hours. If you would like help, prepare specific questions. We will not help you write your code or answers from scratch (part of the learning process is experimentation), but we are more than happy to provide guidance if you run into trouble.

Citations

For all assignments, you must submit a file citing all of the resources (excluding class notes, CRM, and assigned readings) you used to complete the assignment. This includes (but is not limited to) conversations with peers, web resources, and additional books. Failure to appropriately cite resources will be considered a breach of the honor policy and will be dealt with as described in this document. If, at any point, you are unsure about the citation policy, ask. Your grade is not affected by the number of resources you cite; I will not be impressed by low or high citation counts. Use the resources you need to complete the assignments!

Legacy Grading

Note: While this class borrows heavily from the version taught by Wes Weimer, it is by no means the same class. Therefore, the challenges in this class, especially those introduced by legacy grading, will be slightly different from previous years.

Past versions of this class taught at UVA have contained slightly more difficult programming assignments than those used for this class. Students wishing to challenge themselves may opt to use "Legacy Grading" when submitting their assignments.

The legacy grading option gives students the opportunity to gain experience supporting older, legacy versions of programming languages when completing their assignments. Writing cross-platform and architecture-independent code that works on legacy servers is a particular challenge and a relevant skill for industry. The language versions used for Legacy Grading are:

Automated Legacy Grading

The grading rubrics remain the same for the legacy grading option. Legacy grading uses an alternate testing environment that provides less information, uses harder tests, and uses the legacy language versions listed above. In particular, these held-out tests are typically anonymized (e.g., "your submission failed test #5") instead of labeled (e.g., "your submission failed test call-to-unknown-constructor.cl"). In addition, there may be more, different, or more difficult tests.

If you use features, functions or syntax added in newer version of these languages, your code may not work on our grading servers. This is particularly relevant for Ruby and Python. In addition, because the Legacy Grading Contract server is terse with error messages, it may be difficult to tell the difference between "my code is failing a test because of an algorithmic mistake" and "my code is failing a test because I used a feature from the wrong version of this language". When reading standard library documentation, you may want to pay particular attention to @since and similar annotations that indicate when a function was added to the language. This challenge is intentional.

Opting In and Out

You may choose to use the legacy grading option on an assignment-by-assignment basis. If you are working with a partner, be sure that your partner also wishes to submit using the legacy grading option.

To opt-in for an assignment, choose the "Legacy" option when submitting your assignment to the grading server. You may only opt-in at your first upload for the assignment or after you receive full marks with the standard grading server (both testing and submission count as an upload). You may not switch back and forth between the two grading options arbitrarily, and you are bound by the honor code not to do so. (Note that we save all submissions to the grading server and can verify this.)

You may opt-out of legacy grading at any point. Once you opt-out for an assignment, you must receive full marks with the standard grading server before you may opt back in to the legacy grading.

Generally speaking, it is a poor choice to switch back and forth between the two grading options. You will lose a significant amount of time opting in and out (in particular, you must rewrite certain assignments in a different language). Pick a grading option before starting an assignment, and stick with it for best results.

You receive the grade from your most recent submission to the grading server. For example, if you pass all tests on the standard server, opt in to the legacy grading, and subsequently fail 5 test cases, you will lose 5 points.

Additional Challenges

If you would like to challenge yourself even more, you may also skip over any video guides provided for these assignments.

Why Legacy Grading?

In some senses, you will have to "do more work for the same grade" when you choose legacy grading. Why, then, might you choose the legacy option?

A student may honestly desire to learn as much as possible, regardless of the threat of a slightly lower grade or the additional time commitment required. While this is not a good fit for all students (e.g., a student trying to hold down a part-time job and take a number of electives may not have time for the extra work of the Legacy Grading Contract), some students will have both the time and the interest to do so.

The legacy option also provides students desiring an extra challenge with specific, additional tasks to complete.

Regrading Policy

Requests for an assignment regrade must be made in person to the instructor within one week of the assignment being returned to the student and by the final day of classes. Any requests submitted after this may be done at my discretion. I reserve the right to regrade the entire assignment, which may result in either an increase or a decrease in your grade. This is not intended to scare off students, but to avoid frivolous requests.

Examples of appropriate reasons for requesting a regrade include:

Examples of inappropriate reasons for requesting a regrade include:

Academic Integrity and Professionalism

The School of Engineering and Applied Science relies upon and cherishes its community of trust. We firmly endorse, uphold, and embrace the University's Honor principle that students will not lie, cheat, or steal, nor shall they tolerate those who do. We recognize that even one honor infraction can destroy an exemplary reputation that has taken years to build. Acting in a manner consistent with the principles of honor will benefit every member of the community both while enrolled in the Engineering School and in the future.

Students are expected to be familiar with the university honor code, including the section on academic fraud (http://www.virginia.edu/honor/what-is-academic-fraud-2/). Plagiarism detection will be used on work submitted for this class. Deviation from specified collaboration and resource usage policy will be considered honor code violations. If in doubt, the best option is to ask for clarification! Violations will result in a zero grade on the implicated assignments, and serious violation will result in failure of the course. Violations are not subject to the regrade policy. Honor code violations will be submitted to the Honor Committee when appropriate.

Students are also expected to act in a professional manner for the duration of the course. This includes (but is not limited to): staying on task during lectures, being respectful of others, avoiding extra use of electronics in class, and promptness for class and deadlines. Unprofessional behavior will result in a reduction of the student's final grade.

Accommodations

If your learning or participation in this course may be affected by a disability or any other factor, please talk to me early in the semester so that we can arrange appropriate accommodations. I will do my best to ensure that everyone can learn effectively.

If you have been identified as an SDAC student, please let the Center know you are taking this class. If you suspect you should be an SDAC student, please schedule an appointment with them for an evaluation. I happily and discretely provide the recommended accommodations for those students identified by the SDAC. Please contact me one week before an exam so we can make accommodations.

If you have other special circumstances (e.g., athletics or other university-related activities), please contact me as soon as you know these may affect you in class.

Research

Your class work might be used for research purposes. For example, we may use anonymized student assignments to design algorithms or build tools to help programmers. Any student who wishes to opt out can contact the instructor to do so after final grades have been issued. This has no impact on your grade in any manner.

This Syllabus

This is a "living syllabus". Therefore, its contents may be changed throughout the course of the semester to address changing needs. I will do my best to notify students of changes; however, it is up to the student to monitor this page for any changes. Final authority on any decision in this course rests with the instructor (i.e., me), not with this document.

Many ideas for this class were borrowed from similar classes taught at UVA, UC Berkley, Cornell, and St. Lawrence University.