Basics | Goals and Outcomes | Requirements | Evaluation | Policies | Computing

Syllabus

Basics

Course

Instructor

Course Resources

  • the course web page: https://www.cs.uni.edu/~wallingf/teaching/cs4550/
  • the course mailing list: cs-4550-01-fall@uni.edu
    I will use the mailing list to announce items of interest and answer questions. You may also send ideas and questions for the group to see. Note that to send messages to the course mailing list, you must send from the mailing address from which you are subscribed. By default, that is your uni.edu e-mail address. If you'd like to be subscribed from some other address, you may do so yourself, or let me know.

Course Readings

  • There is no required text to purchase. All readings will be available free online and assigned with each session.
  • The primary supporting text is Introduction to Compilers and Language Design, by Douglas Thain. The book is available as a pdf file on the course website. Suggested readings will link directly to chapters on the book's website.
  • The course Resources page lists a few other online texts that might be useful as references.

Course Goals and Outcomes

Goals

This semester, we will study the ideas that make it possible for a computer program to process other programs. The canonical example of a language processor is the compiler, which requires a broad and deep array of language-processing ideas. But these techniques apply to a broad range of programming tools, including interpreters and IDEs. Compilers also demonstrate the deep connection between mathematics, language, and programs, and so teach us about the applications of computing theory to our programming practice.

Working in small teams, you will build a complete compiler for a small but sufficiently powerful programming language. Your compiler will likely be the single most complex program that you write as a student. For this reason, CS 4550 serves as a 'project course' for the foundations area of our computer science curriculum and is a valuable course to take as you near the end of your degree program.

This course confronts you with a fundamental idea of computer science:

The compiler for any computer language is just another program.

This course will help you develop an in-depth understanding of a compiler, from scanning and parsing through program analysis and optimization to code generation for a target machine — which may itself be another program. It does so by giving you the opportunity to read, design, critique, and implement a complete compiler.

By the end of the semester, you should have a solid grasp of what a compiler is and how to build one. Among the more general goals that I have for the course is for you to learn both the low- and high-level patterns of programming that will make you better programmers and designers. Finally, by implementing a program of significant size and complexity, you will learn an awful lot about programming and software engineering more generally — and you'll likely find many of the ideas you've learned up to now useful!

Learning Outcomes

By the end of the semester, you should be able to:

  • explain the basic phases of a compiler
  • describe and explain the important issues and trade-offs in the implementation of programs for each phase
  • build the components of a compiler, by hand
  • assemble and document an open-source software project

You should also value basic software engineering practices and tools, the ability to work with teammates to achieve a goal, and standards of professional behavior.

The outcomes of this course contribute to these outcomes of a Computer Science major:

  • Students will be able to prepare and produce written communications using standard computing style and format.
  • Students will be able to prepare and deliver an oral presentation on computing topics.
  • Students will demonstrate proficient knowledge and application of computing content.
  • Students will be able to specify a computing module's interface and design its implementation.
  • Students will work on a team to analyze a computing problem and implement its solution.

Course Requirements

Class sessions

Our class meetings will consist of a mixture of lecture, discussion, and in-class exercises. Much of our lecture and discussion material will go beyond what you read in our textbooks, so attendance is essential. I expect you to read assigned topics prior to the class session and to participate actively in class.

Homework assignments

Over the course of the term, you will do four small homework assignments, applying ideas and techniques learned in class. These assignments may involve reading code, writing code, analyzing ideas, and writing short essays.

Exam

We will have one take-home exam, near the middle of the semester. At least one part of it will be open notes.

Compiler project

Over the course of the semester, you will complete one large project: your compiler. The project will be broken into six major phases plus a wrap-up assignment. You and your teammates will present your completed compiler during the scheduled final exam period.

Course Evaluation

Distribution

You will earn your grade based on your performance on the compiler homework and on the four homework assignments. I assign final grades using the following distribution:

Item Number Weight
Assignments 4 10%
Project 1, in several phases 90%

Grades will be assigned using an absolute scale:

  • 90% or above for an A
  • 80% or above for a B
  • 70% or above for a C
  • 60% or above for a D
  • below 60% for an F

This means that there is no curve. However, I reserve the right to lower the letter grade boundaries at the end of the semester if I think that produces grades that better reflect what students have achieved.

Compiler Project

The project consists of six main modules and a final module. Points are earned as follows.

Compiler implementation
Modules 1-6 are worth 20 points each, for a total of 120 points.

Module 7 is worth 130 points: 10 points for the requirements of the final module and 20 points each of the first six modules, which can be improved and fixed throughout the semester.

Thus, the compiler implementation is worth a total of 120 + 130 = 250 points.
Compiler demonstration
The team will demo its final project during the final exam period. This demonstration is worth 25 points.
Project evaluations
Team members will assess the contributions of every member of their team, including themselves, and will evaluate the project demos of every other team. These project assessments are worth 25 points in total.

Thus, the compiler project is worth a total of 250 + 25 + 25 = 300 points.

The instructor reserves the right to adjust any student's share of the team's total project points based on the collective assessments by the instructor and by the team's members of that student's contribution to the project.

Course Policies

General Policies

Participation in the Course.   I try to accommodate student needs whenever possible, but I can only do so if I know about them. If you ever have to make alternate arrangements for a class session, an exam, or an assignment, please contact me, in advance, if at all possible. The safest way to make such arrangements is by notifying me via e-mail or phone of your circumstances and how you can be reached.

Walk-In Office Hours.   My regularly-scheduled office hours are times when I am committed to provide assistance to you. No matter how busy I may appear when you arrive, the office hours are for you. You are encouraged to make use of that time. I am also available by appointment at other times if you cannot make an office hour.

Laptops in Class.   I encourage students to bring laptops to class and to use them as we write code and learn new ideas. In class, you should use a laptop almost exclusively for work related to the current session. Most importantly, your use of a laptop must never distract another student. This applies to other classroom technology, including cell phones.

Assignments.   All assignments are due at their assigned date and time. In order to receive partial credit, always submit your best effort at that time.

Collaboration.   I encourage you to work together on homework assignments, as a way to help you understand the problems better and to encounter different points of view. You must acknowledge any collaboration explicitly in the work you submit. However, any work you submit must be your own. Discuss ideas, but write your own answers, including all code. Undocumented or unacceptable collaboration is considered a violation of academic integrity.

Project.   The compiler project, which accounts for most of your grade in this course, is a team project. Most of you will write your compiler in teams of two, three, or four. The rules in the preceding two paragraphs are different for the project. We will discuss late project modules in class. The rule on submitting your own work applies to the project, but with the word "you" referring to the project team.

Required Syllabus Statements.   UNI has a number of university-level policies common to the syllabi of all course. This course will adhere to all of these policies.

Academic Integrity

Standard of Ethical Behavior

UNI has an established policy of academic integrity. Plagiarism and other forms of academic dishonesty will not be tolerated in this course. See the UNI catalog under "Academic Ethics Policies" for details on the university's policy.

Use of Tools to Generate Code

This is a course for learning how to write a compiler, not a course for learning how to use programs that generate code. Therefore, you may not use any tools, AI or otherwise, to create code that you submit for this course.

If you submit code that I think was generated by a tool, I will arrange to meet with you (or your team) within a week to discuss your submission. If you cannot explain your code or use its technique to solve a different problem of my choosing, or if you do not meet with me within a week, the assignment will receive a grade of 0.

Use of Copilot, ChatGPT, and Other "AI" Tools

While you may not used tools like Copilot and ChatGPT to generate code for you, you may use them to enhance your learning. Examples of such usage include:

  • prompting the tool to generate additional examples of an idea, to help you consolidate your understanding of it
  • prompting the tool to generate additional exercises on a topic, to give you more practice working with it

If you use these tools in this way, I encourage you to share with me your prompts, or the exercises and your attempts to solve them. This will help me help you to validate the quality of the responses.

Do not assume that the responses generated by these tool are aligned with the goals or content of the course. The tools may generate content not covered in class, which can create in confusion or lead you to use techniques that are too complex for the course — or that do not meet the specification of the project. Seek verification from me to ensure you are on the right track.

Computing Environment

Communication in the course will be done by email and the web. I will post all course materials to the CS 4550 web page, and we will make use of other web-based resources when appropriate. I will occasionally email course updates and other materials. You are always welcome to email me.

We also have a class-wide mailing list, cs-4550-01-fall@uni.edu, with which we carry on discussion outside the confines of class meetings. Be sure that you stay up-to-date with both the website and the mailing list.

You may write your programs in any language of your choice and your team's choice. In past semesters, students have written their compilers in Java, Python, Racket, Scheme, C, Ruby, Rust, and Common Lisp. Each of these languages has specific advantages and disadvantages as the implementation language of a compiler. I am open to implementations in other languages.

My platforms for the course are Mac OS X 15.6 (Sequoia) and student.cs.uni.edu, the CS Linux system for students. You may develop in any environment you like, as long as I can compile and run your programs on one of these platforms. Both provide up-to-date versions of the Java Development Kit and standard gcc tools for working in C, as well as current versions of Python, Racket, Ruby, and many other languages. If your team wishes to program in another language, please let me know so that we can make the necessary tools available on these platforms.