LMU ☀️ CMSI 3802
LANGUAGES AND AUTOMATA II
HOMEWORK #1 Due: 2026-05-04

About This Assignment

Though there is only one homework assignment for this course, it is a term project and there is an expectation that you begin working on it no later than the 6th week of class.

The project is the design and implementation of your own programming language, with the following big-picture requirements:

Detailed requirements are below.

Generative AI is permitted for this project.

You are, however, expected to clean up and reorganize any assistant-generated code by removing superfluous comments, renaming its ugly identifier names, restructuring to fit the expected project layout, and everything else required to produce a quality project.

Required Readings and Watchings

Although your team will be implementing the language, compiler, companion website, and final presentation together, every team member is individually responsible for each of the following:

Read these throughout the semester. Don’t try to read them all at once.

Keep in mind these materials are not the only readings and watchings required for the course. See the quiz preparation pages for more.

Detailed Project Requirements

In this class you will not only be writing a compiler—you will be writing a compiler for a language that you design yourself. You have wide latitude in designing your language: I want you to design a language you can actually love. The only requirements are: (1) it must be of sufficient complexity (i.e., enough interesting features, including features beyond the example languages we see in class), and (2) it requires significant work in the static analysis phase. You can satisfy the latter requirement with a statically-typed language with static scoping (in addition to a few other checks of course). It may be possible to design a dynamically typed language, provided you define a significant number of statically checked contextual constraints. If you go with a dynamically-typed language, you should check with me first to make sure your workload is fair.

Implement your project according to the following detailed requirements.

Repository Structure

Your project should end up with a project structured as follows:

  .
  ├── .gitignore
  ├── README.md
  ├── LICENSE
  ├── package.json
  ├── .prettierrc.json        -- (Optional)
  ├── docs
  │   └── ...                 -- logo, companion website, etc.
  ├── examples
  │   └── ...                 -- lots of example programs
  ├── src
  │   ├── (yourlanguagename).js
  │   ├── (yourlanguagename).ohm
  │   ├── compiler.js
  │   ├── parser.js
  │   ├── core.js
  │   ├── analyzer.js
  │   ├── optimizer.js
  │   └── generator.js
  └── test
      ├── compiler.test.js
      ├── parser.test.js
      ├── analyzer.test.js
      ├── optimizer.test.js
      └── generator.test.js

Make sure there are no additional, unnecessary files in your repo. A pristine repo is a happy repo! Don’t lose points by failing to meet this requirement. Pay attention to your .gitignore file!

Functionality

The command line script to run the compiler, the workings of the compiler itself, and the mechanisms for testing and coverage analysis, should work in the same fashion as the Carlos compiler in the course notes.

Language Design

Use the Ohm Editor to assist you in designing your language grammar and syntax, using a creating, prototyping style.

Make sure the language is complex enough, especially in its statics. You should have most if not all of the following performed at compile time: Scope resolution, proper contextual use of return, break, etc., type checking, type inference, parameter matching, pattern exhaustiveness, access controls, etc.

If your language is mostly dynamic, make up for the lack of type checking with something really special, like really a really sophisticated concurrency mechanism that will require more sophisticated code generation and optimization in later assignments.

The README file

Ensure your README has:

Make sure the README is up-to-date with the actual work you did! If something in your language design did not get implemented, mark the associated content in the README with a “Not yet implemented” warning.

The package.json file

Include a proper project name and the names of all the team members in the author field. Add the property "type": "module" to allow for modern JavaScript. Ensure that npm test runs tests with coverage. Be complete with all your metadata, including the repository property.

Tests

100% test coverage! Hold yourself to this goal. Be proud!

Code Style

Ensure all of the code has been Prettied. Your repo is public and you want to show your best face to the world!

Add optimizations to your compiler project. You do not have to do too many, but the few you do should be non-trivial. Because everyone in class is compiling a somewhat different language, you must check with me early regarding which optimizations are appropriate for your project. Don’t worry, we will negotiate the set of optimizations that you are responsible for, so there should be no surprises when you get your grade.

Companion Website Requirements

For your language website (a.k.a. a “Home Page”) for your programming language using GitHub Pages. The site’s page (or pages) should consist of a single page and:

Presentation Requirements

During the last class session, present, as your entire group, a lightning talk introducing (and showing off!) your language to the rest of the class. Be personal, be funny, and be brief! You may use slides, video, and even music. If you are using slides, don’t use too many, and make sure they are colorful...with images, and please put these in your project repository. If your language has a theme (pirates, horror, uwu, vikings, fashion, sci-fi, anime, social policy, medical, whatever), you can dress up (but avoid stereotypes and be respectful).

For tips on how to do a good lightning talk, see here, here, and here. What’s a lightning talk? Wikipedia can tell you.

Checklists

The following checklists are my best effort at helping you make a beautiful and complete project. I might be missing some things, so try to add to it anything you think is important.

Project

Companion Website

Presentation

Participation

Submission Instructions

Turn in a single submission for your entire group via BrightSpace, that contains, in text: