Skip to main content
UIUC
Computer Science
3 credits

UIUC CS 421: Programming Languages and Compilers

CS 421 covers functional programming in OCaml, lambda calculus, operational semantics, type systems and inference, parsing, and interpreter construction. It's a required core course for UIUC CS majors and most students' first serious encounter with the functional paradigm.

Fennie is independent and not affiliated with University of Illinois Urbana-Champaign. This is an unofficial study guide.

Build my CS 421 study plan

What makes it hard

The paradigm shift is the wall: recursion replacing loops, immutability replacing state, and types doing work students have never asked types to do. Exam questions on unification, evaluation order, and typing derivations demand stepwise precision that cramming can't fake.

What you'll cover

  • Functional programming in OCaml
  • Recursion and higher-order functions
  • Lambda calculus
  • Type systems and type inference
  • Operational semantics
  • Parsing and interpreters

The CS 421 study guide

How to study for UIUC CS 421, step by step.

  1. 1

    Commit to the functional style immediately

    Fighting OCaml by writing imperative code in disguise prolongs the adjustment. Practice small recursive and higher-order-function exercises daily for the first month — fluency here discounts everything after.

  2. 2

    Work the formal systems on paper

    Typing derivations, unification steps, and evaluation rules are graded as exact sequences. Write them out by hand, rule by rule, until the bookkeeping is automatic — recognition is not production.

  3. 3

    Trace evaluation order until it's boring

    Questions about what reduces when — eager versus lazy, applicative versus normal order — are exam staples. Trace small expressions step by step rather than trusting intuition built on imperative languages.

  4. 4

    Use the MPs to cement the lectures

    The interpreter and type-checker assignments implement exactly what lecture formalizes. Connecting each MP to its theory unit while both are fresh is the course's intended learning loop.

  5. 5

    Pace the paradigm shift with Fennie

    Upload the CS 421 schedule and Fennie's Daily Plans schedule daily functional-programming reps through the critical first month, with derivation drills and quizzes generated from your actual course materials before each exam. Free to start.

    Start my CS 421 plan free

How Fennie helps with CS 421

Fennie's Daily Plans schedule the daily OCaml repetitions that make CS 421's paradigm shift land in the first month instead of exam week. Chat through typing derivations and evaluation traces step by step, and drill generated quizzes on the formal rules the exams grade as exact sequences.

FAQ

Is CS 421 hard at UIUC?

Its difficulty is concentrated in the paradigm shift — students who embrace functional style early find the back half smooth, while students who fight OCaml struggle all semester. The formal material rewards paper practice over rereading.

Do I need to know OCaml before CS 421?

No — the course teaches it from scratch, and prior functional experience in any language transfers well. What matters is committing to recursive, immutable style early instead of writing imperative code with OCaml syntax.

How do I study for CS 421 exams?

Produce, don't recognize: write typing derivations, unification steps, and evaluation traces by hand until the rule bookkeeping is automatic. Past exams and the MP material map closely to what's tested.

Pass CS 421 with a plan, not a cram

Upload your CS 421 materials and Fennie generates a Daily Plan paced to your deadline — plus chat, flashcards, and quizzes built from the actual course content.

Get started free

More UIUC courses