CMSI 3802
Quiz 5 Preparation

When

Last 10 minutes of class on Wednesday, March 25, 2026.

Everyone takes the exam at the same time.

Scope

Language Design, Ohm, Compilers and Interpreters.

Ground Rules

You will take the exam on Brightspace. There is 10 minute time limit, or 15 minutes for those with time-and-a-half accommodations.

Preparation Checklist

Do each of the following to maximize your preparation:

Were you able to check off every box?

Outline of Course Content

The fact that active recall is better for acquiring long-term knowledge does not mean that outlines and concept maps are not useful. Learners should use multiple techniques—think “both and” rather than “either or.”

Language Design
    Things to know
    Major features of existing programming languages
    Historical Issues
        What Bret Victor says about the 1960s and 1970s
        What Alan Kay thinks
    The process of language design
        Big picture and big questions
        Starter set of features
        Design your abstract syntax
        Sketch and Prototype with Ohm!!!
        Start working on lower-level syntax
        What kind of sugar do you want?
    Differences between syntax, semantics, pragmatics
    Ohm for language design
        Ohm grammar notation
        Ohm details
        Examples of Ohm grammars
    Case study: Astro
    Case study: Bella
    Case study: Carlos
Ohm
    TODO
Compilers and Interpreters
    Translators vs. interpreters
    Compilers, assemblers, transpilers
    AOT vs. JIT
    Overall structure of translation
        Analysis -> Generation
        Analysis -> Optimization -> Generation
        Parsing -> Static Analysis -> Optimization -> Code Generation
        Lexical Analysis
            characters to tokens
        Syntax Analysis = Parsing
            Tokens to CSTs
        Semantic Analysis = Static Analysis
            CSTs to ASTs
            ASTs are pretty much DAGs, so best to call them program representations
            Type checking and other semantic analysis
                Storing types with expressions in the DAG nodes
                Reps have nodes not in the AST, e.g. actual functions and variables
            Design decisions: can we simplify the storage of numbers and types?
        Intermediate Representations
            Why have them?
        Sneak peek: later phases of the compiler
            Control Flow Analysis
            Data Flow Analysis
            Optimization of decorated AST
            Production of high-level language code
            Production of abstract intermediate structures
            Production of bytecode
            Production of abstract assembly language
            Machine independent optimization
        Modern compilers are not just one-shot translators
        How to architect a compiler using Ohm
            parser.js
            analyzer.js
                Representing context
                Checks, especially type checking
            optimizer.js
            generator.js
            core.js
            compiler.js
            <your-language-name>.js
            Tests for compiler, parser, analyzer, optimizer, generator
      Why you should write a compiler

About the Problems

This is a mini-quiz which tests for immediate understanding of topics and not your ability to work out problems over an extended duration of time. There is a strict time limit so that your immediate fluency is tested rather than your ability to search the web (or worse, ask a chatbot), since these things take time. There will be 5–10 questions, some will be multiple choice, some multi-select, and some matching. There are no free-form answers, so the exam will be autograded and you will see your score immediately after it is submitted.

All content on the assigned readings is fair game for questions, so do not neglect the readings, and by all means do the recall questions!