Skip to content

An implementation of the Tiger language in Ocaml; Andrew Appel

Notifications You must be signed in to change notification settings

justinba1010/Tiger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tiger

This is an implementation of the Tiger Programming Language, but in Ocaml. This is based off of Andrew Appel's Modern Compiler Implementation in ML.

I chose Ocaml because it was easier to install on a Raspberry Pi, then Standard ML of New Jersey, and that I currently work in Ocaml/ReasonMl, and thought I would go ahead and learn the syntax of Ocaml anyways for future reference and being able to read Ocaml libraries.

Currently I am just following the exercises.

Chapter 1

  • Write an ML function (maxArgs : stm -> int) that tells the maximum number of arguments of any print statment within any subexpression of a given statement. For example, maxArgs(prog) is 2.
  • Write an ML function interp : stm -> unit that "interprets" a program in this language. To write in a functional style - without assignment (:=) or arrays - maintain a list of (variable, integer) pairs, and produce new versions of this list at each AssignStm.

Chapter 1 Exercises

About

An implementation of the Tiger language in Ocaml; Andrew Appel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published