HAVM

HAVM is a Tree (HIR or LIR) programs interpreter. It was written by Robert Anisko so that EPITA students could exercise their compiler projects before the final jump to assembly code. It is implemented in Haskell, a pure non strict functional language very well suited for this kind of symbolic processing. HAVM was coined on both Haskell, and VM standing for Virtual Machine.

Resources:
  • Required version is HAVM 0.27

  • HAVM Home Page

  • HAVM Documentation

  • Feedback can be sent to LRDE’s Projects Address.

  • There are some known bugs that cause HAVM to execute incorrectly HIR programs. This happens when some jump break the recursive structure of the program, i.e., when a jump goes outside its enclosing structure (seq, or eseq etc.).

    Examples of Tiger sources onto which HAVM is likely to behave incorrectly include:

    while 1 do
       print_int((break; 1))
    

    File 5.2: ineffective-break.tig

    or

    if 0 | 0 then 0 else 1
    

    File 5.3: ineffective-if.tig

    See HAVM’s documentation for details, node “Known Problems”.