study2026Completed

Hygge language compiler

A didactic F# compiler pipeline for the Hygge language.

study/2026

Overview

Coursework extending hyggec, DTU's didactic compiler for the Hygge teaching language, written in F#, with a full pipeline of lexer, parser, typechecker, ANF transformation, and RISC-V code generation, tested via the RARS RISC-V simulator.

A group report typeset in LaTeX documents the language extensions implemented.

Highlights

  • Full pipeline from lexer to RISC-V code generation
  • Extended the language with arrays, mutable structs, and recursive functions
  • Function subtyping and recursive subtyping in the type checker
  • Short-circuit and/or plus scoped for-loops
  • Verified on the RARS simulator