Loading ...
Sorry, an error occurred while loading the content.

A toy implementation of SECD machine in OCaml

Expand Messages
  • Zheng Li
    Hi there, I guess this is better posted here rather than the official list. I just made a toy implementation of Landin s SECD machine in OCaml. You can get the
    Message 1 of 1 , Oct 31, 2007
    View Source
    • 0 Attachment
      Hi there,

      I guess this is better posted here rather than the official list.

      I just made a toy implementation of Landin's SECD machine in OCaml. You can
      get the src and doc at http://www.pps.jussieu.fr/~li/software/index.html#secd

      It's coded in quite a hurry. I haven't got time to test it thoroughly, but so
      far it works fine over the examples I fed.

      Description
      ===========

      SECD is a toy implementation of SECD machine in OCaml. It tries to follow the
      original definitions in Landin's seminal paper [1]. The main purpose is just
      "for fun". Features include:

      * Type safe: SECD terms are typed
      * Inter-operation: any OCaml value can be wrapped as a SECD term, and any
      SECD term can be evaluated (through the machine) to its corresponding OCaml
      value
      * Two evaluation strategies: call-by-value/call-by-name optional
      * Simple: ~100 LOC

      [1] Peter J. Landin. The mechanical evaluation of expressions. Computer
      Journal, 6(4):308-320, January 1964.

      --
      Zheng Li
      http://www.pps.jussieu.fr/~li
    Your message has been successfully submitted and would be delivered to recipients shortly.