Slang2 Compiler. 

Changes from Slang.1: 

This is an incomplete version of a compiler for language L3 
(without records, tuples, inl, inr, and case) from SPL. 
It only generates code for a stack machine. The register machine 
is left as an exercise. 

Currently, the compiler is only useful in verbose mode for vsm. 
That is, use "slang2 -v -vsm <file>" to see the various stages. 
No binary code is actually emitted. 

1) The lex/yacc lexer and parser are addapted from L2  with minor 
changes. 

2) This version now uses an intermediate representation
found in Appel's book, Chapters 6 and 7.   This implements a solution 
to Exercise 8 from the file Slang1_Programming_Exercises.txt. 

In slang1v2 (slang1 with minor bug fixes) we had 

   to VRM : expr -> normal_expr -> vrm_assembler ... 
   to VSM : expr ----------------> vsm_assembler ... 

Instead, this version uses an intermediate language found in 
Appel Chapter 7 and implemented in Tree.sig/Tree.sml. 

We then implement a function 

  Semant.transProg : AST_expr.expr -> Tree.stm

and could now have 

 vrm_code_gen : Tree.stm -> vrm_assembler
 vsm_code_gen : Tree.stm -> vsm_assembler, 

although vrm_code_gen is left as an exercise. 

2) The compiler works as follows.  After the front end, 

   a) Alpha.convert is used to make each bound variable unique. 
   b) Closure.convert : AST_expr.expr -> AST_closure.prog is applied 
      to lift all function definitions to the top level. 
   c) multiple iterations of Closure.simplify are applied. 
      Each application performs 
      --- beta reduction : "let x = value in e" is replaced by e[v/x]
      --- function inlining of non-recursive functions (very aggressive!) 
      --- constant folding 
   d) Translate.translate : : AST_closure.prog -> Tree.prog 
      then translates to a modified version of Appel's Tree representation. 
   e) vsm_code_gen.vsm_code_gen generates VSM assembler. 




