CS-364: Programming Languages

Syllabus

Course Staff

Instructor

Kevin Angstadt
Kevin Angstadt
(he/him/his)

Office: Bewkes 121-1
Email: kangstadt@stlawu.edu
Communication Hours: I regularly check Email and Piazza 8-4 on weekdays. While I may respond outside those hours, I make no guarantees.

Student Hours:

  • MW 11–12
  • TTh 1–2
  • By appointment
Addressing: I encourage you to call me by any one of the following names. Please use what makes you feel the most comfortable.
  • Kevin
  • Prof./Dr. Angstadt
  • Prof./Dr. A
  • Prof./Dr. Kevin

Course Information

Spring 2022
Meets: MW 2:30–4:00
Room: Valentine 207
Course Requirements:

  • Students must have completed CS-256. I assume that you have mastered the material in the courses leading up to, and including, 256.
  • While not required, students are encouraged to have completed CS-220 (or take CS-220 during the same semester).
  • Knowledge of object-oriented and imperative programming in Python and Java.
  • Students will benefit from having access to a personal computer during class time. If you do not have a computer you can bring to class, please let me know ASAP.
  • Students are expected to attend class regularly.

Required Materials

Important Dates

Description Date
First Class Meeting 2022-01-19
Last Day to Add/Drop 2022-01-27
P1a Due 2022-02-02
P1b Due 2022-02-09
P2 Due 2022-02-18
Exam 1 2022-02-23
P3 Due 2022-03-06
No Class — Spring Break 2022-03-14/16
Exam 2 2022-03-30
Pass/Fail Deadline 2022-04-01
P4 Due 2022-04-03
Last Day to Withdraw 2022-04-07
P5A Suggested Due 2022-04-24
Exam 3 2022-04-27
Last Day of Class 2021-05-04
Final Exam Period (P5 and all assignments due) 2022-05-11

Course Overview and Goals

From the course catalog: Addresses several advanced topics in programming: the process of code interpretation, the principles behind the design of programming languages, and the paradigms of functional and concurrent programming.

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 Strings Numbers Arrays and Inheritance Language (snail).

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 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 Topics

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 snail 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

Course Format

This course is being offered in a fully-synchronous format. As public health conditions allow, this course will be offered in-person for students on campus.

Weekly Lectures

Each week, there will be synchronous lectures during our scheduled course time. During these lectures, we will explore the topics covered by this course and develop the skills described in the learning goals section. Please review the attendance policy below for expectations about attending these lectures.

Lectures will be recorded and available on Sakai for students wishing to review material covered in this course.

Homework Assignments

Throughout the semester, you will have several different kinds of homework assignments to complete. Homework will be listed on the Lectures page of this site. Each assignment will also indicate which platform you should use for submitting your work.

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 Gradescope 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.

Programming Projects

There will be a total of five (5) programming projects during the semester. These exercises are intended to give you practice with and explore and concepts presented in class. Additionally, P3-P5 form a complete interpreter for snail, the Strings Numbers Arrays and Inheritance Language.

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

These projects will require substantial time commitment on every student's part. Please refer to the individual project specifications as they are released for detailed instructions on how and what to submit and specific due dates. Points may be deducted for late assignments, and all assignments must be submitted no later than one week after the official due date to receive credit.

You will submit these projects through the St. Lawrence University Grading Server (SLUGS). This system will run your code against a suite of test cases and give you (near) immediate feedback. You will have five (5) submissions a day before the due date. All students are given four (4) late days for the semester to use on whatever project(s) and for whatever reason, no questions asked. You can use them for illness, family emergency, computer or equipment failure, loss or erasure of files, internet access problems, work for other courses, and other outside commitments. Use them wisely! You must use one late per calendar day after the deadline in order to submit a project late. If you want to submit a project one day after the deadline, it will simply cost you one late day. If you want to submit a project two days after the deadline, and you have already used one late day on that project for the day after the deadline, then it will simply cost you a second late day. However, if you want to submit a project two days after the deadline, but you did not use a late day on that project for the day after the deadline, then it will still cost you two (not one) late days.

SLUGS will grade your submissions on:

  • Functional correctness,
  • Execution speed to obtain a correct solution, and
  • Computer memory needed to reach a correct solution

For each project, I will conduct a final grading run after the deadline, where every student's project is run one-by-one on the autograder, possibly with additional, hidden test cases. The purpose of running every student's project one-by-one is to even out the playing field by giving everybody the same computing resources when determining project grades, so your score should not be penalized because your runtime or memory usage was affected by other students' projects being run in parallel. The purpose of the hidden test cases (they will be randomly generated cases, not the trickiest corner cases) is to ensure that your project works in general, and not just for the autograder. When conducting final grading, I will use your best submission, unless you email me requesting that I use your last submission within 48 hours after the project deadline. "Best submission" is defined as the submission with the highest displayed score prior to the deadline. If multiple submissions are tied as being your best submission, then I will use the most recent of those submissions for final grading.

The score resulting from final grading is the score that will go in the gradebook. This means that your overall highest displayed score on SLUGS may not necessarily be the score that goes in the gradebook. It is possible that your score may go up, stay the same, or go down as a result of the final grading. In particular, I will also look at your submitted code to judge the:

  • principles and practices (readable code, efficient algorithms and implementation, comments, use of topics from class), and
  • documentation of your solution.

A well-designed and commented, but slower solution may have its grade increased while a sloppy yet fast implementation may lose points.

You must email me if unexpected circumstances prevent you from completing the assignment using the provided late days.

Exams

There will be three (3), 90 minute exams to check your mastery of tools and concepts in this class. Content for the exams may come from lecture, readings, and programming assignments and is cumulative.

Some of these exams may require the use of a computer. If a student is unable to provide their own computer, please notify me 48 hours prior to the exam, and I will arrange for a loner machine. Make-up exams will not be given for absences unless approved by the instructor in extreme circumstances.

Note that there is no final exam for this course.

Should public health conditions change, the format and modality of these exams may change.

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 student 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?" during student hours.

I do my best to post resources from class online (slides, audio recordings, etc.), but I write a significant amount on the board. This means you will need to review notes from a peer or rewatch the video recordings.

SARS-CoV2 Flexibility

Many aspects of life are currently unpredictable due to the pandemic. Should you become unable to attend class (e.g., you become sick, you have a doctor's appointment, or your housing situation changes), please email me as soon as possible.

A Zoom link may be provided on Sakai for you to join remotely if the campus operating status or public health situation makes remote learning prudent.

Grading

Final grades are based off of a cumulative point system. That means, for example, that 1 point from a reading quiz or project is equivalent to 1 point from an exam.

Your final grade will be calculated as follows. First, the percent of total possible points your eceived is calculated. Then, this percentage is mapped to a numeric grade on the 4.00 scale (see below). Note that I do not guarantee any particular rounding scheme for this calculation.

Grade Max Min
4.0010096
3.759593
3.509290
3.258987
3.008683
2.758280
2.507976
2.257673
2.007270
1.756967
1.506664
1.256362
1.006160
0.00590

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:

  • You believe your answer to a question matches the answer on the key.
  • Your answer is different from the key, but is also correct.
  • There is in error in the summation of points.

Examples of inappropriate reasons for requesting a regrade include:

  • Your programming assignment works on your computer but not the grading server.
  • Most of what you wrote on an assignment was correct, but you want more partial credit.
  • You are one point away from an 3.75 and are trying to get extra points.

Extra Credit

There will be several opportunities for extra credit throughout the semester. In particular, you can receive extra points for discovering and documenting bugs in the reference implementation of snail, the langauge we will be implementing this semester. Should you find a bug, submit a minimal example along with a detailed description of the expected behavior and how this differs from the observed behavior. Students whoe discover a bug will receive N points per bug and all other students will receive N/2 points. (The value of N will be picked at the end of the semester and will be a constant value).

Electronics Policy

Students will need a computer with an internet connection to participate in this course. If you do not have access to a reliable computer, please contact me as soon as possible. There may be resources available to help.

Students are expected to remain on task during synchronous activities (no 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.

Academic Integrity and Professionalism

As noted in the Academic Honor Code in the Student Handbook, "all students at St. Lawrence University are bound by honor to maintain the highest level of academic integrity." Please review the handbook for general guidelines. In particular, you should only be turning in your own work. You are expected to abide by the additional policies listed below. It is my responsibility to report violations of these policies to the Dean.

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.

Assignment Policies

In addition to the general policies described in the Student Handbook, you are expected to follow the following policies, which are specific to this course.

Late Work

Unless otherwise noted (e.g., project submissions) or discussed, you must turn in your work within one week of the due date to receive credit. If you find yourself in a situation where this might not be possible, please contact me as soon as possible.

Collaboration

For several projects in this class, you will be working in groups. 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. All members bear full responsibility for the completion of projects. Teams turn in one solution for each project. If a partnership is not going well, the instructor will help to negotiate new partnerships. Teams may not be dissolved in the middle of an assignment without instructor permission. If the instructor believes that there is unequal contribution to a project, students may be asked to schedule a meeting to discuss their work.

Unless otherwise noted, you must complete all other assignments in this course on your own.

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. Always make a note in your code of your peers with whom you discussed an assignment

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 (unless you are given explicit permission).

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.

I will be available to answer questions during student hours. If you would like help, prepare specific questions. I will not help you write your code or answers from scratch (part of the learning process is experimentation), but I am 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 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!

In addition to following the practice of academic honesty, the purpose of these citations is to help you find resources when you look back at your work. If you were confused by something before, it's likely you might be confused by it again later.

Best Practices

When it comes to academic integrity and professionalism, it's best to ask questions if you are unsure. It has been my experience that most violations are acts of desperation or misunderstanding rather than ill will. I would rather you ask for help or clarification than commit an act of academic dishonesty.

As a general rule of thumb, when you are talking to someone (other than the instructor or partner) about work in this class, close all code that you are working on. If you cannot look at your code (or others' code!) while you are discussing content, it becomes significantly more difficult to violate these policies.

Mental Health and Wellbeing

St. Lawrence University is committed to advancing the mental health and wellbeing of its students. If you or someone you know is feeling overwhelmed, depressed, and/or in need of support, services are available.

For help, contact the Diana B. Torrey '82 Health and Counseling Center at (315) 229-5392 Monday through Friday from 8:30 AM–4:30 PM. After hours, call Campus Safety at (315) 229-5555 to speak with the after-hours crisis counselor. The nation-wide 24/7 crisis counselor service can be reached by calling (315) 229-1914.

For more details, visit https://www.stlawu.edu/health-and-counseling-services.

Accommodations

If you have a specific learning profile, medical and or mental health condition and need accommodations, please be sure to contact the Student Accessibility Services Office right away so they can help you get the accommodations you require. If you need to use any accommodations in this class, please meet with your instructor early and provide them with your Individualized Educational Accommodation Plan (IEAP) letter so you can have the best possible experience this semester.

Although not required, your instructor would like to know of any accommodations that are needed at least 10 days before a quiz or test. Please be proactive and set up an appointment to meet with someone from the Student Accessibility Services Office.

Color Vision Deficiency:

If you are color vision deficient, the Student Accessibility Services office has on loan glasses for students who are color vision deficient. Please contact the office to make an appointment.

For more specific information about setting up an appointment with Student Accessibility Services please see the options listed below:

Telephone:

315.229.5537

Email:

studentaccessibility@stlawu.edu

For further information about Student Accessibility Services, you can check the website at: https://www.stlawu.edu/student-accessibility-services

Diversity and Equity Statement

As indicated by the University's Statement on Diversity and the student handbook, we are committed to treating students fairly and with dignity regardless of age, color, creed, disability, marital status, national origin or ancestry, race, religion, sex (including gender identity and gender expression), sexual orientation, and/or veteran status.

It is my intent that students from all diverse backgrounds and perspectives be well served by this course, that students' learning needs be addressed both in and out of class, and that the diversity that students bring to this class be viewed as a resource, strength and benefit. Should you have any concerns, problems, or suggestions, please do not hesitate to contact me. I strive to make my classrooms safe spaces for learning.

Please also feel free to talk to me about events that happen outside my classroom. If you do not feel comfortable talking to me, there are many other resources available to you on campus, including those on this list of on-campus resources: https://www.stlawu.edu/diversity-and-inclusion/campus-resources.

You can report a bias incident here: https://www.stlawu.edu/diversity-and-inclusion/bias-reporting.

PQRC

The Peterson Quantitative Resource Center (PQRC) offers free, no appointment necessary peer tutoring across a range of courses with quantitative content. The PQRC student staff of mentors is trained to assist students to develop and to improve their quantitative skills and understanding. More information about the PQRC's current hours and modes of operation can be found at the PQRC webpage: www.stlawu.edu/pqrc.

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 up to seven days after final grades have been issued. This has no impact on your grade in any manner.

Right to Revise

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., Kevin Angstadt), not with this document.

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