Terminal project · 9 cumulative units · Free
Compiler Optimizer
Build an integer-kernel optimizer and reduce a wrong-result transformation to a useful witness.
Get the course on GitHubRead setup and the nine lessons · Use your browser’s Back button to return here.
- What you’ll learn
- Integer IR semantics, dominance, dataflow, alias/effect reasoning, loop motion, validation and reduction.
- Your project
- Your own optimization decisions and evidence policy, ending with a smaller wrong-result witness and a narrow repair.
- How you’ll work
- 9 cumulative units. Static school reading and Node terminal implementation; browser workbench unavailable.
What you’ll build
- Implement observation comparison, dominance and scalar rewrites for a supplied integer IR.
- Add conditional constants, alias/effect decisions, loop motion and evidence-based pass selection.
- Reduce a genuine miscompilation, investigate an unfamiliar transformation and retain useful optimizations after repair.
Before you start
JavaScript ES modules, functions, objects, trees/graphs and terminal use. The course supplies the IR runtime, execution/checking infrastructure and file/history tools; you implement the analyses and optimization decisions.
Use installed Node 26.x; the owner observed Node 26.5.1 on macOS arm64. No npm install, solver, API key, GPU, external service or model download. Node executes trusted learner code with ordinary local permissions; the eight-second worker limit is not a security sandbox.
The U08/U09 reduction defect is closed by an independent focused public-interface recheck: renaming cannot shrink a witness, genuine input simplification remains valid, and U09 requires structural reduction. Kernel IR v1 has fixed-width integers, typed arrays and defined traps; no frontend, LLVM compatibility, native code generation or universal proof is promised. All nine public units, cumulative optimizer/capstone and export/restore were exercised from a clean Git checkout in an owner-authored source-aware run. Browser/accessibility and human learning remain unmeasured.
Run the course locally
Clone the learner project as shown below, then run these commands from its courses folder.
cd compiler-optimizer
node cli.mjs start work
node cli.mjs lesson 01
node cli.mjs check 01 work --help-used noneEdit work/optimizer.mjs and continue through units 01–09. The untouched starter should fail. Checks snapshot source, question, help and result before execution. Export and restore to new paths as documented in README.md; browser practice history is separate from terminal code history. Read the school guides here, then perform the project in the learner project. No school browser workbench is launched.
The TODO starter should fail with useful diagnostics. Implement a step, run its checks and preserve the result before revising. The course folder contains the lessons, project contracts and self-review guidance.
Optional LLM help uses your own account and is advice, not correctness evidence. No staffed feedback is required. Passing checks covers their declared cases; learning gains and human completion times remain unmeasured.
Clone the learner project
git clone https://github.com/itsHabib/free-to-learn.git
cd free-to-learn
git checkout fbaa574779092598628054780587838f3d6b3762
cd courses/compiler-optimizerBrowse this exact learner edition. Use the documented installed tools; preserve first attempts and actual assistance. Supplied starters are intentionally incomplete. Instructor-only material and actual learner submissions are excluded.