Oat — a compiler for a C-like language
Description #
Coursework for Compiler Design, built up over a semester into a complete compiler for Oat, a small C-like language with structs, arrays, function pointers and subtyping.
The front end lexes and parses source into an AST and type-checks it; the middle end lowers that AST to an LLVM-style SSA intermediate representation; the back end performs register allocation and emits x86-64 assembly that links and runs against a small C runtime. Written in OCaml, with the type system doing a lot of the heavy lifting on the IR transformations.
(Source code not provided due to university policy)