Compiler Construction 2015
Computer Laboratory 
University of Cambridge 
Timothy G. Griffin (tgg22@cam.ac.uk) 

This directory contains Ocaml code implementing 
a high-level interpreter for version 1 of the language 
Slang ( = Simple LANGuage).  

===============================================
Building 
===============================================

  ocamlbuild slang.byte 

This will build the executable slang.byte as 
well as a directory _build of compiled code. 

===============================================
Files
===============================================

Every .ml file has an associated .mli file 
describing its interface. 


past.ml  : the parsed AST 

ast.ml   : "internal" AST 

pp_past.ml : pretty printing for parsed AST 

pp_ast.ml : pretty printing for internal AST 

static.ml : static analysis (check types and other rules) 

past_to_ast.ml : translated from parsed to internal AST 

alpha.ml : "alpha convert" 

front_end.ml : the front end : parse, static check, translate, alpha convert. 

common.ml : some commonly used datatypes and functions 

interp_0.ml : The "definitional" interpreter (other interpreters will follow ...)

tests.ml : code for parsing tests/manifest.txt and setting up testing. 

slang.ml : main file, implementing the command-line for the interpreter




               
