Skip to content
🔌 A Compiler and Type Inference System for a subset of Standard ML called Small. Programming Languages class project. 🛠
Standard ML Prolog Python Parrot Lex Shell Makefile
Branch: master
Clone or download
Pull request Compare This branch is 14 commits ahead of kentdlee:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
othertests
.gitignore
Instructions.txt
JCoCo.jar
Makefile
Makefile.gen
README.md
a.casm
a.term
coco
disassembler.py
exercise8.sml
mlast.sml
mlcomp
mlcomp.grm
mlcomp.grm.desc
mlcomp.grm.sig
mlcomp.grm.sml
mlcomp.lax
mlcomp.lex
mlcomp.lex.sml
mlcomp.sml
mlcompimage.x86-linux
mytest.sml
runtests
scoco
sources.cm
test0.sml
test0.txt
test1.sml
test1.txt
test10.sml
test10.txt
test11.sml
test11.txt
test12.output
test12.sml
test12.txt
test13.sml
test13.txt
test14.sml
test14.txt
test15.sml
test15.txt
test16.sml
test16.txt
test17.sml
test17.txt
test18.sml
test18.txt
test19.sml
test19.txt
test2.sml
test2.txt
test20.sml
test20.txt
test21.sml
test21.txt
test22.sml
test22.txt
test23.sml
test23.txt
test24.sml
test24.txt
test25.sml
test25.txt
test26.sml
test26.txt
test27.sml
test27.txt
test28.sml
test28.txt
test29.sml
test29.txt
test3.sml
test3.txt
test30.output
test30.sml
test30.txt
test31.sml
test31.txt
test32.sml
test32.txt
test33.sml
test33.txt
test34.sml
test34.txt
test35.output
test35.sml
test35.txt
test36.sml
test36.txt
test37.sml
test37.txt
test38.sml
test38.txt
test39.sml
test39.txt
test4.sml
test4.txt
test40.sml
test40.txt
test5.sml
test5.txt
test6.sml
test6.txt
test7.sml
test7.txt
test8.sml
test8.txt
test9.sml
test9.txt
testaspat.sml
testaspat2.sml
testbool.sml
testfact.sml
testmap.sml
testmap2.sml
testnegate.sml
testwildcardpat.sml
typecheck
types.pro

README.md

🔌 MLComp - Programming Languages - CS370 Project 🛠

MLComp is a Compiler and Type Inference System for a subset of Standard ML called Small. Programming Languages - CS 370 class project.

The Final Project for Programming Languages - CS370

MLComp is a Compiler and Type Inference System for a subset of Standard ML called Small.

The Final project was to complete the code generation and type checking for the following tests from the MLComp directory:

  • test12.sml

  • test30.sml

  • test35.sml

Feel free to clone this repository or its related repositories and to explore the projects.

MLComp is a compiler for the Small language. Small is a subset of Standard ML with a few additional function that may be called. This compiler is written in Standard ML and targets the CoCo Virtual Machine. The code provided here is a partial implementation of the compiler, serving as a starting point for student working in the text "Fundamentals of Programming Languages" by Kent D. Lee and published by Springer. This code is free for educational use. Any derivation of this code for commercial purposes must be license by Kent Lee. All code in this project (c) 2014, 2017 by Kent D. Lee, All Rights Reserved.

The project requires Standard ML of New Jersey be installed, SWI Prolog, and the CoCo or JCoCo virtual machine. Once these three platforms are installed the project can be compiled and run with these commands.

  • % make

  • % mlcomp test0.sml

The project consists of both a compiler and a type checker. The compiler is written in Standard ML and targets the CoCo virtual machine. The type checker is written in Prolog and implements the Standard ML type inference system. The call to the type checker is initially commented out in the mlcomp script. When beginning to work with the type checker un-comment the two lines that call the type checker in the mlcomp compiler script.

Additional tests are found in this directory. Some will work right away, others require the compiler be extended to support them.

Any questions can be directed to kentdlee@luther.edu.

You can’t perform that action at this time.