[Compiler Construction] Control Flow Graph, Liveness Analysis, Dataflow Analysis and Interference Graph, Implemented in OCaml

I am super busy, but I want to spend some time talking about how to write a compiler in ocaml that has liveness analysis, and can generate interference graph from CFG and liveness analysis, which is fundamental to doing correct, if not efficient, register allocation.

PeterYaoNYU/CompilerInOCaml

A compiler for a ML-ish Languange, with a ML->Scheme->C->CFG->MIPS Pipeline, Register Allocation and Garbage Collection.

The Code can be found under the folder ps7, if not restructured after the writing of this post.

This is part of the NYU graduate level capstone project, with Prof. Joseph Tassarotti.

Read more

[Compiler Construction in Ocaml] Hindley-Milner Type Inference System Implementation

I want to spend some time talking about implementing Hindley-Milner type inference system in Ocaml for a ML-ish langauge. The code is available at my Github, under ps6/mlish_type_check.ml.

PeterYaoNYU/CompilerInOCaml

A compiler for a C-ish language, implemeted in OCaml

This is part of the project for NYU graduate level capstone course by Prof. Joseph Tassarotti.

Read more