Update: 12/20/2022 (Final Project Submission)
src/
ast.mli
: Orlang's AST and SAST definitionscodegen.ml
: Orlang's codegen subroutines for generating LLVM IR from Orlangdesugar.ml
: Orlang's pattern matching subroutinesinstantiation.ml
: initialization/generalization methods for Hindly Milner type inferenceparser.mly
: Orlang's Parserscanner.mll
: Orlang's Scannersemant.ml
: Orlang's semantic checking. Currently checks for type errors (via Algorithm W) and unused variablesunification.ml
: Unification module used in Algorithm W
orlang.ml
: entry point to compilerMakefile
: For your convenience when running testsdemo/
: Demo files for Orlang presentationtests/
: Testcases for Orlang and Prelude
Preparation
$ sudo apt-get install ocaml-findlib
$ opam install llvm
First, build orlang via
$ make
in the root directory. Then, run
$ make all_tests
To compile individual files
$ ./orlang.native <input_file> <output_file>